array_tool::string

Trait AfterWhitespace

Source
pub trait AfterWhitespace {
    // Required method
    fn seek_end_of_whitespace(&self, offset: usize) -> Option<usize>;
}
Expand description

After whitespace

Required Methods§

Source

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)
);

Implementations on Foreign Types§

Source§

impl AfterWhitespace for str

Implementors§