voca_rs 1.8.0

Voca_rs is a Rust library for manipulating strings. Inspired by Voca.js and string.py
Documentation

voca_rs Build Status Crates version codecov Codacy Badge license

Voca_rs is a Rust library for manipulating strings.

Voca_rs is inspired by Voca.js and string.py

TL;DR

use voca_rs::*;

let input_string = "LazyLoad with XMLHttpRequest and snake_case";
let string_in_words = split::words(&input_string);
// => ["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 = case::snake_case(chop::slice(&words_in_string, 13, 28));
// => "xml_http_request"
let truncated_string = chop::prune(&words_in_string, 15, "");
// => "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

Chop

Count

Escape

Index

Manipulate

Query

Split

Strip

Utils

Roadmap

  • Rewrite the code, so the functions (when it is possible) are accessible directly on String/&str. That can be achieved using an extension trait.
  • Possible refactoring: all position indexes covert to zero-based and add a comment to each doc.
  • Change all inner arguments to Enums (instead string or bool)

Count

Format

Manipulate

Implementations on Foreign Type

  • impl Inflector for String - link
  • impl Inflector for str - link

Copyright

coded by Anatol Marezhanyi @e1r0nd_crg

https://linkedin.com/in/merezhany/ https://www.youtube.com/c/AnatolMerezhanyi

License

Licensed under MIT License