Skip to main content

strip_digit_separators

Function strip_digit_separators 

Source
pub fn strip_digit_separators(s: &str) -> Cow<'_, str>
Expand description

s with every digit separator removed, ready for str::parse.

Borrows when there is nothing to remove, which is every literal anyone actually writes. Only the separators the lexer accepts can be present, so this is a filter and not a validator: a malformed _ never reaches it.