Lines Matching refs:str
20 int gnss_parse_dec_to_nano(const char *str, int64_t *nano) in gnss_parse_dec_to_nano() argument
28 __ASSERT(str != NULL, "str argument must be provided"); in gnss_parse_dec_to_nano()
32 while (str[pos] != '\0') { in gnss_parse_dec_to_nano()
34 if (str[pos] == '.') { in gnss_parse_dec_to_nano()
47 start = str[0] == '-' ? 1 : 0; in gnss_parse_dec_to_nano()
53 if (str[pos] < '0' || str[pos] > '9') { in gnss_parse_dec_to_nano()
58 sum += (str[pos] - '0') * increment; in gnss_parse_dec_to_nano()
79 while (str[pos] != '\0') { in gnss_parse_dec_to_nano()
81 if (str[pos] < '0' || str[pos] > '9') { in gnss_parse_dec_to_nano()
86 sum += (str[pos] - '0') * increment; in gnss_parse_dec_to_nano()
102 int gnss_parse_dec_to_micro(const char *str, uint64_t *micro) in gnss_parse_dec_to_micro() argument
106 __ASSERT(str != NULL, "str argument must be provided"); in gnss_parse_dec_to_micro()
109 ret = gnss_parse_dec_to_nano(str, micro); in gnss_parse_dec_to_micro()
119 int gnss_parse_dec_to_milli(const char *str, int64_t *milli) in gnss_parse_dec_to_milli() argument
123 __ASSERT(str != NULL, "str argument must be provided"); in gnss_parse_dec_to_milli()
126 ret = gnss_parse_dec_to_nano(str, milli); in gnss_parse_dec_to_milli()
135 int gnss_parse_atoi(const char *str, uint8_t base, int32_t *integer) in gnss_parse_atoi() argument
139 __ASSERT(str != NULL, "str argument must be provided"); in gnss_parse_atoi()
142 *integer = (int32_t)strtol(str, &end, (int)base); in gnss_parse_atoi()