Function is_char_boundary

Source
pub fn is_char_boundary(buffer: &[u8], offset: usize) -> bool
Expand description

Returns true if offset in the underlying buffer falls on a valid UTF-8 codepoint boundary.

This is only specified if the input buffer is valid UTF-8, no guarantees otherwise.