SDLGameEngine

SgeString

String handling functions. More...

Functions

int sgeCharIsWhitespace (char c)
 test if a character is a whitespace character (space, newline, tab, ...)
char * sgeTrim (char *str)
 trim all whitespace characters from beginning of end of a string
char * sgeLower (char *str)
 convert a string to lower case
char * sgeUpper (char *str)
 convert a string to upper case
char * sgeConfigNameFromString (char *str)
 return the name of a config string
char * sgeConfigValueFromString (char *str)
 return the value of a config string

Detailed Description

String handling functions.


Function Documentation

int sgeCharIsWhitespace ( char  c)

test if a character is a whitespace character (space, newline, tab, ...)

Parameters:
cthe character to test
Returns:
YES/NO depending if the character is a whitespace character

Definition at line 11 of file sgestring.c.

char* sgeConfigNameFromString ( char *  str)

return the name of a config string

Parameters:
strthe config string in the form of "name = value"
Returns:
a new char * pointer or NULL if no '=' in string

Definition at line 97 of file sgestring.c.

char* sgeConfigValueFromString ( char *  str)

return the value of a config string

Parameters:
strthe config string in the form of "name = value"
Returns:
a new char * pointer or NULL if no '=' in string

Definition at line 101 of file sgestring.c.

char* sgeLower ( char *  str)

convert a string to lower case

Parameters:
strthe string to make a lower case copy from
Returns:
a new copy of str all lower case

Definition at line 63 of file sgestring.c.

char* sgeTrim ( char *  str)

trim all whitespace characters from beginning of end of a string

Parameters:
strthe string to remove whitspaces from
Returns:
a poiner to a new character string

This function does create a new char * pointer, the original char * is unaltered

Definition at line 26 of file sgestring.c.

char* sgeUpper ( char *  str)

convert a string to upper case

Parameters:
strthe string to make a upper case copy from
Returns:
a new copy of str all upper case

Definition at line 70 of file sgestring.c.

 All Data Structures Files Functions Variables Typedefs Enumerations Enumerator Defines