pub trait AfterWhitespace {
// Required method
fn seek_end_of_whitespace(&self, offset: usize) -> Option<usize>;
}
Expand description
After whitespace
Required Methods§
Sourcefn seek_end_of_whitespace(&self, offset: usize) -> Option<usize>
fn seek_end_of_whitespace(&self, offset: usize) -> Option<usize>
Given offset method will seek from there to end of string to find the first non white space. Resulting value is counted from offset.
§Example
use array_tool::string::AfterWhitespace;
assert_eq!(
"asdf asdf asdf".seek_end_of_whitespace(6),
Some(9)
);