changecase 0.0.2

A trait and implementation for changing the case of strings.
docs.rs failed to build changecase-0.0.2
Please check the build logs for more information.
See Builds for ideas on how to fix a failed build, or Metadata for how to configure docs.rs builds.
If you believe this is docs.rs' fault, open an issue.
Visit the last successful build: changecase-0.0.7

rust-changecase

Change the case of Strings in Rust.

Available functions:

  • Uppercase
  • Lowercase
  • Invert case (inverts the case of each character)
  • AlTeRnAtInG cAsE

What I'm working on:

  • Title Case
  • Implementation for &str

Examples

extern crate changecase;
use changecase::ChangeCase;
use changecase::Case;

assert_eq!(String::from_str("Some").to_uppercase(), "SOME");
assert_eq!(String::from_str("Some").to_lowercase(), "some");
assert_eq!(String::from_str("Some").to_invertedcase(), "sOME");
assert_eq!(String::from_str("some thing").to_capitalized(), "Some thing");
assert_eq!(String::from_str("Some").to_altcase(Case::Lower), "sOmE");
assert_eq!(String::from_str("Some").to_altcase(Case::Upper), "SoMe");