capitalize

Crates.iocapitalize
lib.rscapitalize
version0.3.4
sourcesrc
created_at2022-03-14 15:08:40.75009
updated_at2024-04-22 00:45:33.561326
descriptionChange first character to upper case and the rest to lower case, and other common alternatives
homepage
repositoryhttps://github.com/jhg/capitalize-rs
max_upload_size
id549885
size13,605
Jesus Hernandez (jhg)

documentation

README

Capitalize

Crate version Unlicense Crates.io downloads GitHub Workflow Status

First letter to uppercase, the rest to lowercase. And other common alternatives.

Extensively tested and optimized. Forbidden unsafe in the whole crate.

Examples

use capitalize::Capitalize;

assert_eq!("hello ✨ world".capitalize(), "Hello ✨ world");

Behavior is like Python's str.capitalize, read capitalize reference for details.

Extensively Tested

Languages tested:

  • English
  • Spanish
  • German
  • Turkish
  • French
  • Russian
  • Ukrainian
  • Greek
  • Chinese
  • Arabic
  • Hebrew
  • Korean
  • Japanese
  • Thai
  • Hindi
  • Bulgarian
  • Serbian
  • Macedonian
  • Polish
  • Czech
  • Slovak
  • Croatian
  • Icelandic
  • Armenian
  • Albanian
  • Mongolian
  • Coptic
Commit count: 50

cargo fmt