src/string_util.h File Reference

#include <glib.h>
#include <stdbool.h>

Go to the source code of this file.

Functions

static G_GNUC_CONST char * deconst_string (const char *p)
 Remove the "const" attribute from a string pointer.
G_GNUC_PURE const char * strchug_fast_c (const char *p)
 Returns a pointer to the first non-whitespace character in the string, or to the end of the string.
static G_GNUC_PURE char * strchug_fast (char *p)
 Same as strchug_fast_c(), but works with a writable pointer.
bool string_array_contains (const char *const *haystack, const char *needle)
 Checks whether a string array contains the specified string.

Function Documentation

static G_GNUC_CONST char* deconst_string ( const char *  p  )  [inline, static]

Remove the "const" attribute from a string pointer.

This is a dirty hack, don't use it unless you know what you're doing!

Definition at line 33 of file string_util.h.

static G_GNUC_PURE char* strchug_fast ( char *  p  )  [inline, static]

Same as strchug_fast_c(), but works with a writable pointer.

Definition at line 61 of file string_util.h.

G_GNUC_PURE const char* strchug_fast_c ( const char *  p  ) 

Returns a pointer to the first non-whitespace character in the string, or to the end of the string.

This is a faster version of g_strchug(), because it does not move data.

bool string_array_contains ( const char *const *  haystack,
const char *  needle 
)

Checks whether a string array contains the specified string.

Parameters:
haystack a NULL terminated list of strings
needle the string to search for; the comparison is case-insensitive for ASCII characters
Returns:
true if found

Generated on 9 Aug 2013 for MPD by  doxygen 1.6.1