konst::primitive

Function parse_isize

Source
pub const fn parse_isize(s: &str) -> Result<isize, ParseIntError>
Expand description

Parses a isize from a &str.

This returns an Err if the string would not successfully .parse() into a isize.

To parse a isize from only part of a string, you can use Parser::parse_isize.

§Const stabilization

The equivalent std function, was const-stabilized in Rust 1.82.0.

§Example

For an example of how to use this function, you can look at the one for i128.