Lines Matching refs:str
23 static int get_range(char **str, int *pint, int n)
27 (*str)++;
28 upper_range = simple_strtol((*str), NULL, 0);
37 * @str: option string
38 * @pint: (optional output) integer value parsed from @str
56 int get_option(char **str, int *pint)
58 char *cur = *str;
64 value = -simple_strtoull(++cur, str, 0);
66 value = simple_strtoull(cur, str, 0);
69 if (cur == *str)
71 if (**str == ',') {
72 (*str)++;
75 if (**str == '-')
84 * @str: String to be parsed
94 * When @nints is 0, the function just validates the given @str and
100 * in the range. The rest is what was parsed from the @str.
103 * the parse to end (typically a null terminator, if @str is
107 char *get_options(const char *str, int nints, int *ints)
115 res = get_option((char **)&str, pint);
122 range_nums = get_range((char **)&str, pint, n);
137 return (char *)str;
195 * @str: String to be parsed
203 bool parse_option_str(const char *str, const char *option)
205 while (*str) {
206 if (!strncmp(str, option, strlen(option))) {
207 str += strlen(option);
208 if (!*str || *str == ',')
212 while (*str && *str != ',')
213 str++;
215 if (*str == ',')
216 str++;