rustc_ast_pretty::pprust::state

Function all_whitespace

source
fn all_whitespace(s: &str, col: CharPos) -> Option<usize>
Expand description

Returns None if the first col chars of s contain a non-whitespace char. Otherwise returns Some(k) where k is first char offset after that leading whitespace. Note that k may be outside bounds of s.