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 trancated_string = prune;
// => "Lazy Load..."
Documentation
See the complete documentation at https://e1r0nd.github.io/voca_rs/
Run test: cargo test
Build docs: cargo doc
-> ./target/doc/voca_rs/index.html
Build project: cargo build
-> ./target/debug
Roadmap
Case
- camel_case
- capitalize
- decapitalize
- kebab_case
- lower_case
- pascal_case
- shouty_kebab_case
- shouty_snake_case
- snake_case
- swap_case
- title_case
- upper_case
Chop
Count
- count
- count_graphemes
- count_substrings
- countWhere - link
- count_words
Escape
Format
- format - link
- vformat - link
- parse - link
- get_field - link
- get_value - link
- check_unused_args - link
- format_field - link
- convert_field - link
- substitute - link
- safe_substitute - link
- sprintf - link
- vprintf - link
Index
- index_of
- last_index_of
- search - link
Manipulate
- insert
- latinise - link
- pad - link
- padLeft - link
- padRight - link
- repeat
- replace - link
- replaceAll - link
- reverse
- reverse_grapheme
- slugify - link
- splice
- tr - link
- trim
- trim_left
- trim_right
- wordWrap - link
Query
- ends_with
- includes
- is_alpha
- is_alphadigit
- isBlank
- is_digit
- is_empty
- is_lowercase
- is_numeric
- is_uppercase
- matches - link
- starts_with
Split
Strip
Utils
- ASCII_LETTERS
- ASCII_LOWERCASE
- ASCII_UPPERCASE
- DIGITS
- HEXDIGITS
- OCTDIGITS
- PUNCTUATION
- PRINTABLE
- WHITESPACE
- VERSION
Copyright
coded by Anatol Marezhanyi @e1r0nd_crg
https://linkedin.com/in/merezhany/ https://www.youtube.com/c/AnatolMerezhanyi
License
Licensed under MIT License