From 5462f34ed037111d2d57638352b2f1a65a322579 Mon Sep 17 00:00:00 2001 From: Max Kellermann Date: Thu, 23 Dec 2010 16:16:01 +0100 Subject: string_util: add function strchug_fast() Replace g_strchug() calls with a cheaper implementation. --- src/tokenizer.c | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) (limited to 'src/tokenizer.c') diff --git a/src/tokenizer.c b/src/tokenizer.c index 2b9e05070..358d804dc 100644 --- a/src/tokenizer.c +++ b/src/tokenizer.c @@ -19,6 +19,7 @@ #include "config.h" #include "tokenizer.h" +#include "string_util.h" #include #include @@ -72,7 +73,7 @@ tokenizer_next_word(char **input_p, GError **error_r) /* a whitespace: the word ends here */ *input = 0; /* skip all following spaces, too */ - input = g_strchug(input + 1); + input = strchug_fast(input + 1); break; } @@ -126,7 +127,7 @@ tokenizer_next_unquoted(char **input_p, GError **error_r) /* a whitespace: the word ends here */ *input = 0; /* skip all following spaces, too */ - input = g_strchug(input + 1); + input = strchug_fast(input + 1); break; } @@ -205,7 +206,7 @@ tokenizer_next_string(char **input_p, GError **error_r) /* finish the string and return it */ *dest = 0; - *input_p = g_strchug(input); + *input_p = strchug_fast(input); return word; } -- cgit v1.2.3