Determines the numeric value of a character as a decimal digit. Differs from g_unichar_digit_value() because it takes a char, so there's no worry about sign extension if characters are signed.
Converts a #gdouble to a string, using the '.' as decimal point.
Converts a #gdouble to a string, using the '.' as decimal point. To format the number you pass in a printf()-style format string. Allowed conversion specifiers are 'e', 'E', 'f', 'F', 'g' and 'G'.
Compare two strings, ignoring the case of ASCII characters.
Converts all upper case ASCII letters to lower case ASCII letters.
A convenience function for converting a string to a signed number.
A convenience function for converting a string to an unsigned number.
Compare @s1 and @s2, ignoring the case of ASCII characters and any characters after the first @n in each string.
Converts a string to a #gdouble value.
Converts a string to a #gint64 value. This function behaves like the standard strtoll() function does in the C locale. It does this without actually changing the current locale, since that would not be thread-safe.
Converts a string to a #guint64 value. This function behaves like the standard strtoull() function does in the C locale. It does this without actually changing the current locale, since that would not be thread-safe.
Converts all lower case ASCII letters to upper case ASCII letters.
Convert a character to ASCII lower case.
Convert a character to ASCII upper case.
Determines the numeric value of a character as a hexidecimal digit. Differs from g_unichar_xdigit_value() because it takes a char, so there's no worry about sign extension if characters are signed.
Looks whether the string @str begins with @prefix.
Looks whether the string @str ends with @suffix.
Determines if a string is pure ASCII. A string is pure ASCII if it contains no bytes with the high bit set.
Checks if a search conducted for @search_term should match @potential_hit.
Calculates the maximum space needed to store the output of the sprintf() function.
Copies a nul-terminated string into the dest buffer, include the trailing nul, and return a pointer to the trailing nul byte. This is useful for concatenating multiple strings together without having to repeatedly scan for the end.
For each character in @string, if the character is not in @valid_chars, replaces the character with @substitutor. Modifies @string in place, and return @string itself, not a copy. The return value is to allow nesting such as |[<!-- language="C" --> g_ascii_strup (g_strcanon (str, "abc", '?')) ]|
A case-insensitive string comparison, corresponding to the standard strcasecmp() function on platforms which support it.
Removes trailing whitespace from a string.
Removes leading whitespace from a string, by moving the rest of the characters forward.
Compares @str1 and @str2 like strcmp(). Handles %NULL gracefully by sorting it before non-%NULL strings. Comparing two %NULL pointers returns 0.
Replaces all escaped characters with their one byte equivalent.
Converts any delimiter characters in @string to @new_delimiter. Any characters in @string which are found in @delimiters are changed to the @new_delimiter character. Modifies @string in place, and returns @string itself, not a copy. The return value is to allow nesting such as |[<!-- language="C" --> g_ascii_strup (g_strdelimit (str, "abc", '?')) ]|
Converts a string to lower case.
Duplicates a string. If @str is %NULL it returns %NULL. The returned string should be freed with g_free() when no longer needed.
Similar to the standard C vsprintf() function but safer, since it calculates the maximum space required and allocates memory to hold the result. The returned string should be freed with g_free() when no longer needed.
Copies %NULL-terminated array of strings. The copy is a deep copy; the new array should be freed by first freeing each string, then the array itself. g_strfreev() does this for you. If called on a %NULL value, g_strdupv() simply returns %NULL.
Returns a string corresponding to the given error code, e.g. "no such process". Unlike strerror(), this always returns a string in UTF-8 encoding, and the pointer is guaranteed to remain valid for the lifetime of the process.
Escapes the special characters '\b', '\f', '\n', '\r', '\t', '\v', '\' and '"' in the string @source by inserting a '\' before them. Additionally all characters in the range 0x01-0x1F (everything below SPACE) and in the range 0x7F-0xFF (all non-ASCII chars) are replaced with a '\' followed by their octal representation. Characters supplied in @exceptions are not escaped.
Frees a %NULL-terminated array of strings, as well as each string it contains.
Joins a number of strings together to form one long string, with the optional @separator inserted between each of them. The returned string should be freed with g_free().
Portability wrapper that calls strlcat() on systems which have it, and emulates it otherwise. Appends nul-terminated @src string to @dest, guaranteeing nul-termination for @dest. The total size of @dest won't exceed @dest_size.
Portability wrapper that calls strlcpy() on systems which have it, and emulates strlcpy() otherwise. Copies @src to @dest; @dest is guaranteed to be nul-terminated; @src must be nul-terminated; @dest_size is the buffer size, not the number of bytes to copy.
A case-insensitive string comparison, corresponding to the standard strncasecmp() function on platforms which support it. It is similar to g_strcasecmp() except it only compares the first @n characters of the strings.
Duplicates the first @n bytes of a string, returning a newly-allocated buffer @n + 1 bytes long which will always be nul-terminated. If @str is less than @n bytes long the buffer is padded with nuls. If @str is %NULL it returns %NULL. The returned value should be freed when no longer needed.
Creates a new string @length bytes long filled with @fill_char. The returned string should be freed when no longer needed.
Reverses all of the bytes in a string. For example, g_strreverse ("abcdef") will result in "fedcba".
Searches the string @haystack for the last occurrence of the string @needle.
Searches the string @haystack for the last occurrence of the string @needle, limiting the length of the search to @haystack_len.
Returns a string describing the given signal, e.g. "Segmentation fault". You should use this function in preference to strsignal(), because it returns a string in UTF-8 encoding, and since not all platforms support the strsignal() function.
Splits a string into a maximum of @max_tokens pieces, using the given @delimiter. If @max_tokens is reached, the remainder of @string is appended to the last token.
Splits @string into a number of tokens not containing any of the characters in @delimiter. A token is the (possibly empty) longest string that does not contain any of the characters in @delimiters. If @max_tokens is reached, the remainder is appended to the last token.
Searches the string @haystack for the first occurrence of the string @needle, limiting the length of the search to @haystack_len.
Converts a string to a #gdouble value. It calls the standard strtod() function to handle the conversion, but if the string is not completely converted it attempts the conversion again with g_ascii_strtod(), and returns the best match.
Converts a string to upper case.
Checks if @strv contains @str. @strv must not be %NULL.
Returns the length of the given %NULL-terminated string array @str_array.
Transliterate @str to plain ASCII.
Tokenises @string and performs folding on each token.
An implementation of the GNU vasprintf() function which supports positional parameters, as specified in the Single Unix Specification. This function is similar to g_vsprintf(), except that it allocates a string to hold the output, instead of putting the output in a buffer you allocate in advance.
An implementation of the standard fprintf() function which supports positional parameters, as specified in the Single Unix Specification.
An implementation of the standard vprintf() function which supports positional parameters, as specified in the Single Unix Specification.
A safer form of the standard vsprintf() function. The output is guaranteed to not exceed @n characters (including the terminating nul character), so it is easy to ensure that a buffer overflow cannot occur.
An implementation of the standard vsprintf() function which supports positional parameters, as specified in the Single Unix Specification.