GitPedia

Voca rs

Voca_rs is the ultimate Rust [unicode] string library, implemented as independent functions and on Foreign Types (String and str).

From a-merezhanyi·Updated April 30, 2026·View on GitHub·

**Voca_rs is a Rust library for manipulating [unicode] strings.** The project is written primarily in Rust, distributed under the Other license, first published in 2018. Key topics include: rust, string, string-formatter, string-manipulation, string-matching.

Latest release: v1.51.2v1.15.2
November 10, 2022View Changelog →

voca_rs

Crates version
dependency status
Build Status
codecov
license

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

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

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

TL;DR

Using functions:

rust
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):

rust
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://docs.rs/voca_rs/

Run tests: cargo test<br>
Build docs: cargo doc -> ./target/doc/voca_rs/index.html <br>
Build a project: cargo build -> ./target/debug

Functions

Case

Chop

Count

Escape

Index

Manipulate

Query

Split

Strip

Utils

Coded by A. Merezhanyi

License

Licensed under MIT License

Contributors

Showing top 7 contributors by commit count.

View all contributors on GitHub →

This article is auto-generated from a-merezhanyi/voca_rs via the GitHub API.Last fetched: 6/20/2026