Host library for controlling a WiConnect enabled Wi-Fi module.
Dependents: wiconnect-ota_example wiconnect-web_setup_example wiconnect-test-console wiconnect-tcp_server_example ... more
Diff: StringUtil.h
- Revision:
- 26:8067e3d463d3
- Parent:
- 22:2d7ef60a9f2a
- Child:
- 27:b63f5a9cdefa
--- a/StringUtil.h Tue Aug 26 16:53:06 2014 -0700 +++ b/StringUtil.h Thu Oct 23 15:16:06 2014 -0700 @@ -298,7 +298,7 @@ static bool strToUint32(const char *str, uint32_t *uint32Ptr) { intmax_t r; - bool result = StringUtil::parseInt(str, &r, 0, UINT_MAX); + bool result = (str[0] == '0' && str[1] == 'x') ? StringUtil::parseHex(&str[2], &r, 0, UINT_MAX): StringUtil::parseInt(str, &r, 0, UINT_MAX); *uint32Ptr = (uint32_t)r; return result; }