string_util: add function strchug_fast()
Replace g_strchug() calls with a cheaper implementation.
This commit is contained in:
@@ -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)
|
||||
{
|
||||
|
Reference in New Issue
Block a user