Expand description
Index by lines (all Unicode line breaks).
This module recognizes all line breaks defined in Unicode Annex #14:
U+000A— LF (Line Feed)U+000B— VT (Vertical Tab)U+000C— FF (Form Feed)U+000D— CR (Carriage Return)U+0085— NEL (Next Line)U+2028— Line SeparatorU+2029— Paragraph SeparatorU+000DU+000A— CRLF (Carriage Return + Line Feed)
Functions§
- count_
breaks - Counts the line breaks in a string slice.
- from_
byte_ idx - Converts from byte-index to line-index in a string slice.
- to_
byte_ idx - Converts from line-index to byte-index in a string slice.