Function lexical_core::atoi16[][src]

pub fn atoi16(bytes: &[u8]) -> Result<i16>

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

This method parses the entire string, returning an error if any invalid digits are found during parsing.

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.