Function

GLibstrchug

Declaration

gchar*
g_strchug (
  gchar* string
)

Description

Removes leading whitespace from a string, by moving the rest of the characters forward.

This function doesn’t allocate or reallocate any memory; it modifies string in place. Therefore, it cannot be used on statically allocated strings.

The pointer to string is returned to allow the nesting of functions.

Also see g_strchomp() and g_strstrip().

Parameters

string gchar*
 

A string to remove the leading whitespace from.

 The data is owned by the caller of the function.
 The string is a NUL terminated UTF-8 string.

Return value

Returns: utf8
 

string.

 The caller of the function takes ownership of the data, and is responsible for freeing it.
 The string is a NUL terminated UTF-8 string.