humanize-string
Make a machine string human-readable.
Convert a camelCase, snake_case, or dash-case string into a readable phrase:
fooBar → Foo bar, background-color → Background color,
XMLHttpRequest → Xml http request. A faithful Rust port of the
humanize-string npm package.
- Built on
decamelize - Optional
preserve_casemode - Differential-tested against the reference
humanize-stringimplementation
Install
[]
= "0.1"
Usage
use ;
assert_eq!;
assert_eq!;
assert_eq!;
assert_eq!;
// Keep the original casing (only normalize whitespace + capitalize the first letter):
assert_eq!;
assert_eq!;
Contributors ✨
This project follows the all-contributors specification. Contributions of any kind are welcome — code, docs, bug reports, ideas, reviews! See the emoji key for how each contribution is recognized, and open a PR or issue to get involved.
Thanks goes to these wonderful people:
License
Licensed under either of MIT or Apache-2.0 at your option.