Module str_utils

Source
Expand description

Utility functions for utf8 string slices.

This module provides various utility functions that operate on string slices in ways compatible with Ropey. They may be useful when building additional functionality on top of Ropey.

Functions§

byte_to_char_idx
Converts from byte-index to char-index in a string slice.
byte_to_line_idx
Converts from byte-index to line-index in a string slice.
char_to_byte_idx
Converts from char-index to byte-index in a string slice.
char_to_line_idx
Converts from char-index to line-index in a string slice.
line_to_byte_idx
Converts from line-index to byte-index in a string slice.
line_to_char_idx
Converts from line-index to char-index in a string slice.