Function to_integral

Source
pub fn to_integral<T>(str_: &str) -> Option<T>
Expand description

| Convert string to integral type T. Leading | whitespace, a leading +, or any trailing | character fail the parsing. | | The required format expressed as regex | is -?[0-9]+. The minus sign is only | permitted for signed integer types. | | ———– | @return | | std::nullopt if the entire string could | not be parsed, or if the parsed value | is not in the range representable by | the type T. |