Crate str_indices

source ·
Expand description

Count and convert between different indexing schemes on utf8 string slices.

This crate is organized into modules by indexing scheme. Each module contains functions for counting relevant metrics for that scheme as well as functions for converting to/from byte indices.

None of the functions in this crate panic: all inputs have a defined output.

Modules

Index by chars.
Index by lines (all Unicode line breaks).
Index by lines (carriage return and line feed).
Index by lines (line feed only).
Index by utf16 code units.