diff options
author | Jerome Brunet <jbrunet@baylibre.com> | 2024-09-30 11:28:07 +0200 |
---|---|---|
committer | Jerome Brunet <jbrunet@baylibre.com> | 2024-09-30 11:28:07 +0200 |
commit | 3fd6c59042dbba50391e30862beac979491145fe (patch) | |
tree | 63d729254efdf6446d4d4a05e7a8a0dd803eedec /tools/lib/string.c | |
parent | 1d7ec62374bf049349c47f07f0b95a6524bb1b98 (diff) | |
parent | 9852d85ec9d492ebef56dc5f229416c925758edc (diff) |
Merge tag 'v6.12-rc1' into clk-meson-next
Linux 6.12-rc1
Diffstat (limited to 'tools/lib/string.c')
-rw-r--r-- | tools/lib/string.c | 13 |
1 files changed, 13 insertions, 0 deletions
diff --git a/tools/lib/string.c b/tools/lib/string.c index 8b6892f959ab..3126d2cff716 100644 --- a/tools/lib/string.c +++ b/tools/lib/string.c @@ -153,6 +153,19 @@ char *strim(char *s) return skip_spaces(s); } +/* + * remove_spaces - Removes whitespaces from @s + */ +void remove_spaces(char *s) +{ + char *d = s; + + do { + while (*d == ' ') + ++d; + } while ((*s++ = *d++)); +} + /** * strreplace - Replace all occurrences of character in string. * @s: The string to operate on. |