diff options
Diffstat (limited to 'drivers/acpi/acpica/utstrsuppt.c')
-rw-r--r-- | drivers/acpi/acpica/utstrsuppt.c | 25 |
1 files changed, 25 insertions, 0 deletions
diff --git a/drivers/acpi/acpica/utstrsuppt.c b/drivers/acpi/acpica/utstrsuppt.c index 2526ba3b4f12..965fb5cec94f 100644 --- a/drivers/acpi/acpica/utstrsuppt.c +++ b/drivers/acpi/acpica/utstrsuppt.c @@ -231,6 +231,31 @@ char acpi_ut_remove_leading_zeros(char **string) /******************************************************************************* * + * FUNCTION: acpi_ut_remove_whitespace + * + * PARAMETERS: string - Pointer to input ASCII string + * + * RETURN: Next character after any whitespace. This character may be + * used by the caller to detect end-of-string. + * + * DESCRIPTION: Remove any leading whitespace in the input string. Return the + * next character after the final ASCII zero to enable the caller + * to check for the end of the string (NULL terminator). + * + ******************************************************************************/ + +char acpi_ut_remove_whitespace(char **string) +{ + + while (isspace((u8)**string)) { + *string += 1; + } + + return (**string); +} + +/******************************************************************************* + * * FUNCTION: acpi_ut_detect_hex_prefix * * PARAMETERS: string - Pointer to input ASCII string |