loki_text
loki_text is a Rust library designed for advanced string manipulation. It offers features for pattern searching and replacement, as well as various text transformation operations. Inspired by the Norse god Loki, known for his cunning and manipulations, this library aims to provide powerful and flexible tools for working with strings.
Features
- Pattern Searching and Replacement: Use regular expressions to find and replace patterns within strings.
- Text Transformation: Includes functions to reverse strings, check for palindromes, remove punctuation, extract numbers, and capitalize words.
- Basic String Manipulation: Functions for splitting, joining, converting to uppercase/lowercase, and trimming whitespace.
Installation
Add loki_text to your Cargo.toml:
[]
= "0.1.0"
Examples
Pattern Searching
use find_pattern;
let text = "The quick brown fox jumps over the lazy dog";
let pattern = r"quick\s(\w+)";
let result = find_pattern;
assert_eq!;
Text Transformation
use reverse_string;
let text = "hello world";
let result = reverse_string;
assert_eq!;
Basic String Manipulation
use to_uppercase;
let text = "hello world";
let result = to_uppercase;
assert_eq!;
Contributing
Contributions are welcome! Please feel free to submit issues and enhancement requests.
License
See the LICENSE file for more details.
Future Development
loki_text is an evolving library. Future updates will include more advanced string manipulation functions, improved performance, and additional utilities to make working with strings in Rust even more powerful and convenient. Stay tuned for updates and new features!