Registry / utility / str-indices

str-indices

JSON →
library0.4.4rscratesunverified

Count and convert between indexing schemes on string slices.

# Cargo.toml [dependencies] str_indices = "0.4.4"
INSTALL
IMPORT
SIG · STR-INDICES
S
str-indices
utilityrustv0.4.4
harness data pending
Install & Compatibility
Where this runs

No compatibility data collected yet for this library.

Code
Verified usage

Verified import paths — ran on the pinned version, not inferred.

Utf8Index
use str_indices::Utf8Index;

Convert a byte index to a UTF-8 index in a string.

use str_indices::Utf8Index; fn main() { let s = "hello"; let idx = Utf8Index::from_byte_index(s, 0); println!("{:?}", idx); }
Debug
Known issues

No known issues recorded.

Upgrade
Version history
0.4.4latest on crates.io
Audit
Dependencies

No dependency data recorded yet.

Agent activity
6 hits · last 30 days
node
6
Resources
str-indices — cargo add str-indices · libregistry