Module :: strs_tools
Tools to manipulate strings.
Basic use-case
To add to your project
Features
This crate uses a feature-based system to allow you to include only the functionality you need. Key features include:
string_indentation: Tools for adding indentation to lines of text.string_isolate: Functions to isolate parts of a string based on delimiters.string_parse_request: Utilities for parsing command-like strings with subjects and key-value parameters.string_parse_number: Functions for parsing numerical values from strings.string_split: Advanced string splitting capabilities with various options for delimiters, quoting, and segment preservation.
You can enable features in your Cargo.toml file, for example:
[]
= "0.18.0" # Or your desired version
= [ "string_split", "string_indentation" ]
The default feature enables a common set of functionalities. The full feature enables all available string utilities. Refer to the Cargo.toml for a complete list of features and their dependencies.
Try out from the repository
Architecture & Rule Compliance
This crate follows strict Design and Codestyle Rulebook compliance:
- Explicit Lifetimes: All function signatures with references use explicit lifetime parameters
- mod_interface Pattern: Uses
mod_interface!macro instead of manual namespace definitions - Workspace Dependencies: All external deps inherit from workspace for version consistency
- Universal Formatting: Consistent 2-space indentation and proper attribute spacing
- Testing Architecture: All tests in
tests/directory, never insrc/ - Error Handling: Uses
error_toolsexclusively, noanyhoworthiserror - Documentation Strategy: Entry files use
include_str!to avoid documentation duplication
SIMD Optimization
Optional SIMD dependencies (memchr, aho-corasick, bytecount) are available via the simd feature for enhanced performance on supported platforms.