casefold

Values

pub const ascii_letters: String

ASCII letters (lower and uppercase).

pub const ascii_lowercase: String

ASCII lowercase letters.

pub const ascii_printable: String

All printable ASCII characters.

pub const ascii_punctuation: String

ASCII characters which are considered punctuation characters.

pub const ascii_uppercase: String

ASCII uppercase letters.

pub const ascii_whitespace: String

ASCII characters which are considered whitespace.

pub fn casefold(s: String) -> String

Converts a String to a case-agnostic comparable string. casefold is preferred over string.lowercase when two strings are to be compared for equality.

pub const digits: String

The string “0123456789”.

pub fn expand_tabs(s: String, tabstop: Int) -> String

Expand leading tabs with the given tabstop.

pub const hex_digits: String

The string “0123456789abcdefABCDEF”.

pub fn is_alnum(s: String) -> Bool

True if all graphemes in string are ASCII alphanumeric characters.

pub fn is_alpha(s: String) -> Bool

True if all graphemes in string are ASCII letters.

pub fn is_ascii(s: String) -> Bool

True if all graphemes in string are ASCII characters.

pub fn is_blank(s: String) -> Bool

True if the string contains only ASCII whitespace or if the string is empty.

pub fn is_hspaces(s: String) -> Bool

True if the string contains only spaces and/or tabs or if the string is empty.

pub fn jaro_similarity(first: String, second: String) -> Float

Returns a float between +0.0 and 1.0 representing the Jaro similarity between the given strings. Strings with a higher similarity will score closer to 1.0, with +0.0 meaning no similarity and 1.0 meaning an exact match.

pub const oct_digits: String

The string “01234567”.

Search Document