Skip to main content

read_number

Function read_number 

Source
pub fn read_number<T>(text: &[u8]) -> Result<T, Error>
where T: Ten + From<u8> + Add<T, Output = T> + Mul<T, Output = T> + Sub<T, Output = T>,
Expand description

Retrieve an integer in text form.

All bytes in the text must be within the range b’0’ and b’9’ The text must also not be empty nor have more than 9 characters.