Skip to main content

ascii_bounds

Function ascii_bounds 

Source
fn ascii_bounds(val: &str, start: i64, length: Option<usize>) -> (usize, usize)
Expand description

Returns the start and end byte offset of the substring of an ASCII val, where one char is one byte.

  • start - the start char index of the substring, counted from the end if negative
  • length - the char length of the substring, or None to take the rest of val