Skip to main content

Crate use_text

Crate use_text 

Source
Expand description

§use-text

Composable text primitives for RustUse.

use-text is the thin umbrella crate for the RustUse text workspace. Use it when you want the common prelude and reexports from use-case, use-slug, use-token, use-word, and use-line in one dependency.

§Reexports

  • use_case
  • use_slug
  • use_token
  • use_word
  • use_line

§Example

use use_text::prelude::{slugify, to_snake_case, word_count};

assert_eq!(to_snake_case("HelloWorld"), "hello_world");
assert_eq!(slugify("Hello World"), "hello-world");
assert_eq!(word_count("Hello world"), 2);

Re-exports§

pub use use_case;
pub use use_line;
pub use use_slug;
pub use use_token;
pub use use_word;

Modules§

prelude