voca_rs
Voca_rs is a Rust library for manipulating strings.
Voca_rs is inspired by Voca.js and string.py
TL;DR
use *;
let input_string = "LazyLoad with XMLHttpRequest and snake_case";
let string_in_words = words;
// => ["Lazy", "Load", "with", "XML", "Http", "Request", "and", "snake", "case"]
let words_in_string = &string_in_words.join;
// => "Lazy Load with XML Http Request and snake case"
let snake_string = snake_case;
// => "xml_http_request"
let truncated_string = prune;
// => "Lazy Load..."
Documentation
See the complete documentation at https://e1r0nd.github.io/voca_rs/
Run tests: cargo test
Build docs: cargo doc
-> ./target/doc/voca_rs/index.html
Build a project: cargo build
-> ./target/debug
Functions
Case
- camel_case
- capitalize
- decapitalize
- kebab_case
- lower_case
- lower_first
- pascal_case
- shouty_kebab_case
- shouty_snake_case
- snake_case
- swap_case
- title_case
- upper_case
- upper_first
Chop
Count
Escape
Index
Manipulate
- expand_spaces
- expand_tabs
- insert
- latinise
- pad
- pad_left
- pad_right
- repeat
- replace
- replace_all
- reverse
- reverse_grapheme
- slugify
- splice
- trim
- trim_left
- trim_right
- zfill
Query
- ends_with
- includes
- is_alpha
- is_alphadigit
- is_blank
- is_digit
- is_empty
- is_lowercase
- is_numeric
- is_title
- is_uppercase
- query
- starts_with
Split
Strip
Utils
- ASCII_LETTERS
- ASCII_LOWERCASE
- ASCII_UPPERCASE
- DIGITS
- HEXDIGITS
- OCTDIGITS
- PUNCTUATION
- PRINTABLE
- WHITESPACE
- VERSION
Roadmap
Chop
Count
- countWhere - link
Format
Index
- search - link
Manipulate
Query
- matches - link
Split
- codePoints - link
Strip
- stripTags - link
Copyright
coded by Anatol Marezhanyi @e1r0nd_crg
https://linkedin.com/in/merezhany/ https://www.youtube.com/c/AnatolMerezhanyi
License
Licensed under MIT License