A helper crate for substring functionality for Rust's str
type.
Add the following to your project's Cargo.toml
to include substr
as a dependency from GitHub:
[dependencies]
substr = { git = "https://github.com/srbdev/substr" }
or from crates.io:
[dependencies]
substrs = "0.1.0"
Returns the first nth characters from the input string s
.
Returns the last nth characters from the input string s
.
Return the substring of the input string s
with indices [start, end).
Note: substr
will only work on UTF-8 sequences or may otherwise reference invalid memory or
violate the invariants communicated by the str
type.