chug


Description:

public string chug ()

Removes leading whitespace from a string.

Example: Remove leading whitespace from a string:

public static int main (string[] args) {
string my_wisdom = " \t I'll kill him with this deadly jelly baby! ";
string res = my_wisdom.chug ();

// Output:
// ``' I'll kill him with this deadly jelly baby! '``
// ``'I'll kill him with this deadly jelly baby! '``
print ("'%s'\n", my_wisdom);
print ("'%s'\n", res);

return 0;
}

valac --pkg glib-2.0 string.chug.vala

Returns:

a newly-allocated string holding the result

See also:

string._chomp, string._chug, string._strip, string.chomp, string.strip