ucfirst

Crates.ioucfirst
lib.rsucfirst
version0.4.1
created_at2023-05-11 16:39:07.380923+00
updated_at2025-11-13 18:42:49.329474+00
descriptionUppercase the first letter of a string
homepage
repositoryhttps://github.com/qtfkwk/ucfirst
max_upload_size
id862265
size6,609
(qtfkwk)

documentation

README

This is the long-awaited Rust crate that solves the problem of uppercasing the first letter of a string in Rust.

Full disclosure: this solution was shamelessly lifted from the leading response over on StackOverflow by Shepmaster.

use ucfirst::ucfirst;

assert_eq!(ucfirst("apple"), "Apple");

See also the ccase CLI utility and convert_case library crates.

Commit count: 6

cargo fmt