ot::StringParseUint8() function
Parses a decimal number from a string as `uint8_t` and skips over the parsed characters. If the string does not start with a digit, `kErrorParse` is returned. All the digit characters in the string are parsed until reaching a non-digit character. The pointer `aString` is updated to point to the first non-digit character after the parsed digits. If the parsed number value is larger than @p aMaxValue, `kErrorParse` is returned.
Arguments
aString
A reference to a pointer to string to parse.
aUint8
A reference to return the parsed value.
aMaxValue
Maximum allowed value for the parsed number.
Return value
kErrorNone Successfully parsed the number from string. @p aString and @p aUint8 are updated. kErrorParse Failed to parse the number from @p aString, or parsed number is larger than @p aMaxValue.
ot::StringParseUint8() is called by 4 functions and calls 2 functions:
![]()
ot::StringParseUint8()
ot::StringParseUint8() reads 2 variables:
![]()
ot::StringParseUint8()