Function lexical_core::atoi8_partial[][src]

pub fn atoi8_partial(bytes: &[u8]) -> Result<(i8, usize)>

Checked parser for a string-to-number conversion using Rust slices.

This method parses until an invalid digit is found (or the end of the string), returning the number of processed digits and the parsed value until that point.

Returns a Result containing either the parsed value, or an error container any errors that occurred during parsing.

Numeric overflow takes precedence over the presence of an invalid digit, and therefore may mask an invalid digit error.

  • bytes - Slice containing a numeric string.