All Projects → e1r0nd → Voca_rs

e1r0nd / Voca_rs

Licence: other
Voca_rs is the ultimate Rust string library inspired by Voca.js, string.py and Inflector, implemented as independent functions and on Foreign Types (String and str).

Programming Languages

rust
11053 projects

Projects that are alternatives of or similar to Voca rs

Tiny Utf8
Unicode (UTF-8) capable std::string
Stars: ✭ 322 (+92.81%)
Mutual labels:  unicode, string, string-manipulation, utf-8
Portable Utf8
🉑 Portable UTF-8 library - performance optimized (unicode) string functions for php.
Stars: ✭ 405 (+142.51%)
Mutual labels:  unicode, string, string-manipulation, utf-8
Str
A fast, solid and strong typed string manipulation library with multibyte support
Stars: ✭ 199 (+19.16%)
Mutual labels:  string, string-manipulation, utf-8
Stringz
💯 Super fast unicode-aware string manipulation Javascript library
Stars: ✭ 181 (+8.38%)
Mutual labels:  unicode, string-manipulation, utf-8
Transliteration
UTF-8 to ASCII transliteration / slugify module for node.js, browser, Web Worker, React Native, Electron and CLI.
Stars: ✭ 444 (+165.87%)
Mutual labels:  unicode, utf-8
Ustring
The Hoa\Ustring library.
Stars: ✭ 403 (+141.32%)
Mutual labels:  unicode, string
String
Provides an object-oriented API to strings and deals with bytes, UTF-8 code points and grapheme clusters in a unified way.
Stars: ✭ 709 (+324.55%)
Mutual labels:  unicode, string
Php Confusable Homoglyphs
A PHP port of https://github.com/vhf/confusable_homoglyphs
Stars: ✭ 27 (-83.83%)
Mutual labels:  unicode, string
Encoding.js
Convert or detect character encoding in JavaScript
Stars: ✭ 338 (+102.4%)
Mutual labels:  unicode, utf-8
Unicopy
Unicode command-line codepoint dumper
Stars: ✭ 16 (-90.42%)
Mutual labels:  unicode, utf-8
Mightystring
Making Ruby Strings Powerful
Stars: ✭ 28 (-83.23%)
Mutual labels:  string, string-manipulation
Tomlplusplus
Header-only TOML config file parser and serializer for C++17 (and later!).
Stars: ✭ 403 (+141.32%)
Mutual labels:  unicode, utf-8
String Extra
Unicode/String support for Twig
Stars: ✭ 92 (-44.91%)
Mutual labels:  unicode, string
Awesome Unicode
😂 👌 A curated list of delightful Unicode tidbits, packages and resources.
Stars: ✭ 693 (+314.97%)
Mutual labels:  unicode, utf-8
Bstr
A string type for Rust that is not required to be valid UTF-8.
Stars: ✭ 348 (+108.38%)
Mutual labels:  unicode, utf-8
Stringplus
Funny and minimal string library for C++ inspired by underscore.string
Stars: ✭ 7 (-95.81%)
Mutual labels:  string, string-manipulation
Litestringbuilder
Alternative to the System.Text.StringBuilder C# class.
Stars: ✭ 48 (-71.26%)
Mutual labels:  string, string-manipulation
Strman Java
A Java 8 string manipulation library.
Stars: ✭ 1,362 (+715.57%)
Mutual labels:  string, string-manipulation
nim-ustring
utf-8 string for Nim
Stars: ✭ 12 (-92.81%)
Mutual labels:  string, utf-8
Unibits
Visualize different Unicode encodings in the terminal
Stars: ✭ 125 (-25.15%)
Mutual labels:  unicode, utf-8

voca_rs Build Status Crates version dependency status codecov Codacy Badge license

Voca_rs is a Rust library for manipulating [unicode] strings.

Voca_rs is inspired by Voca.js (JavaScript), string.py (Python), Inflector (Rust), and Grafite (PHP).

Voca_rs is implemented on Foreign Types, i.e. String and str. Respects Unicode.

TL;DR

Using functions:

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 truncated_string = chop::prune(&words_in_string, 21, "");
// => "Lazy Load with XML..."
let sliced_string = chop::slice(&truncated_string, 5, -2);
// => "Load with XML."
let snaked_string = case::snake_case(&sliced_string);
// => "load_with_xml"

Using traits (all methods start from the underscore symbol):

use voca_rs::Voca;

"LazyLoad with XMLHttpRequest and snake_case"
._words()
// => ["Lazy", "Load", "with", "XML", "Http", "Request", "and", "snake", "case"]
.join(" ")
// => "Lazy Load with XML Http Request and snake case"
._prune(21, "")
// => "Lazy Load with XML..."
._slice(5, -2)
// => "Load with XML."
._snake_case();
// => "load_with_xml"

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

  • Ensure respecting unicode string for each method. Update each function's description clearly stating whether it works with UTF or ASCII.
  • 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)
  • To ensure that all regexp expressions are wrapped by lazy_static

Chop

  • limit_words (from "words") - link
  • deconstantize - link
  • demodulize - link

Format

Manipulate

Copyright

coded by Anatol Marezhanyi @e1r0nd_crg

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

License

Licensed under MIT License

Note that the project description data, including the texts, logos, images, and/or trademarks, for each open source project belongs to its rightful owner. If you wish to add or remove any projects, please contact us at [email protected].