Lines Matching refs:string

4  * Module Name: utstrsuppt - Support functions for string-to-integer conversion
27 * PARAMETERS: string - Null terminated input string
32 * DESCRIPTION: Performs a base 8 conversion of the input string to an
40 acpi_status acpi_ut_convert_octal_string(char *string, u64 *return_value_ptr)
45 /* Convert each ASCII byte in the input string */
47 while (*string) {
53 if (!(ACPI_IS_OCTAL_DIGIT(*string))) {
62 status = acpi_ut_insert_digit(&accumulated_value, 8, *string);
68 string++;
81 * PARAMETERS: string - Null terminated input string
86 * DESCRIPTION: Performs a base 10 conversion of the input string to an
94 acpi_status acpi_ut_convert_decimal_string(char *string, u64 *return_value_ptr)
99 /* Convert each ASCII byte in the input string */
101 while (*string) {
107 if (!isdigit((int)*string)) {
116 status = acpi_ut_insert_digit(&accumulated_value, 10, *string);
122 string++;
135 * PARAMETERS: string - Null terminated input string
140 * DESCRIPTION: Performs a base 16 conversion of the input string to an
148 acpi_status acpi_ut_convert_hex_string(char *string, u64 *return_value_ptr)
153 /* Convert each ASCII byte in the input string */
155 while (*string) {
161 if (!isxdigit((int)*string)) {
170 status = acpi_ut_insert_digit(&accumulated_value, 16, *string);
176 string++;
189 * PARAMETERS: string - Pointer to input ASCII string
192 * used by the caller to detect end-of-string.
194 * DESCRIPTION: Remove any leading zeros in the input string. Return the
196 * to check for the end of the string (NULL terminator).
200 char acpi_ut_remove_leading_zeros(char **string)
203 while (**string == ACPI_ASCII_ZERO) {
204 *string += 1;
207 return (**string);
214 * PARAMETERS: string - Pointer to input ASCII string
217 * used by the caller to detect end-of-string.
219 * DESCRIPTION: Remove any leading whitespace in the input string. Return the
221 * to check for the end of the string (NULL terminator).
225 char acpi_ut_remove_whitespace(char **string)
228 while (isspace((u8)**string)) {
229 *string += 1;
232 return (**string);
239 * PARAMETERS: string - Pointer to input ASCII string
241 * RETURN: TRUE if a "0x" prefix was found at the start of the string
247 u8 acpi_ut_detect_hex_prefix(char **string)
249 char *initial_position = *string;
251 acpi_ut_remove_hex_prefix(string);
252 if (*string != initial_position) {
256 return (FALSE); /* Not a hex string */
263 * PARAMETERS: string - Pointer to input ASCII string
271 void acpi_ut_remove_hex_prefix(char **string)
273 if ((**string == ACPI_ASCII_ZERO) &&
274 (tolower((int)*(*string + 1)) == 'x')) {
275 *string += 2; /* Go past the leading 0x */
283 * PARAMETERS: string - Pointer to input ASCII string
286 * string
292 u8 acpi_ut_detect_octal_prefix(char **string)
295 if (**string == ACPI_ASCII_ZERO) {
296 *string += 1; /* Go past the leading 0 */
300 return (FALSE); /* Not an octal string */