string_util: add function strchug_fast()

Replace g_strchug() calls with a cheaper implementation.
This commit is contained in:
Max Kellermann
2010-12-23 16:16:01 +01:00
parent 0958ed5844
commit 5462f34ed0
7 changed files with 64 additions and 10 deletions

View File

@@ -24,6 +24,15 @@
#include <assert.h>
const char *
strchug_fast_c(const char *p)
{
while (*p != 0 && g_ascii_isspace(*p))
++p;
return p;
}
bool
string_array_contains(const char *const* haystack, const char *needle)
{