Lines Matching refs:str
4 * \brief Verifies that string is in string parameter format i.e. "<str>"
7 * \param str String parameter.
11 int verify_string(char **str)
13 if ((*str)[0] != '"' ||
14 (*str)[strlen(*str) - 1] != '"') {
16 "Expected string (with \"\") for parameter and got: %s\n", *str);
20 (*str)++;
21 (*str)[strlen(*str) - 1] = '\0';
30 * \param str Input string.
35 int verify_int(char *str, int32_t *value)
42 for (i = 0; i < strlen(str); i++) {
43 if (i == 0 && str[i] == '-') {
49 str[i - 1] == '0' && (str[i] == 'x' || str[i] == 'X')) {
54 if (!((str[i] >= '0' && str[i] <= '9') ||
55 (hex && ((str[i] >= 'a' && str[i] <= 'f') ||
56 (str[i] >= 'A' && str[i] <= 'F'))))) {
64 *value = strtol(str, NULL, 16);
66 *value = strtol(str, NULL, 10);
73 "Expected integer for parameter and got: %s\n", str);