Skip to content

jhg/capitalize-rs

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

50 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

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

About

Trait to add capitalize method to Rust strings

Topics

Resources

License

Stars

Watchers

Forks

Sponsor this project

 

Packages

No packages published

Languages