![]() |
Functions | |
int | iupStrEqual (const char *str1, const char *str2) |
int | iupStrEqualNoCase (const char *str1, const char *str2) |
int | iupStrEqualPartial (const char *str1, const char *str2) |
int | iupStrBoolean (const char *str) |
int | iupStrFalse (const char *str) |
int | iupStrLineCount (const char *str) |
const char * | iupStrNextLine (const char *str, int *len) |
int | iupStrCountChar (const char *str, int c) |
char * | iupStrDup (const char *str) |
char * | iupStrCopyUntil (char **str, int c) |
void | iupStrCopyN (char *dst_str, int dst_max_size, const char *src_str) |
char * | iupStrGetMemory (int size) |
char * | iupStrGetMemoryCopy (const char *str) |
void | iupStrLower (char *dstr, const char *sstr) |
void | iupStrUpper (char *dstr, const char *sstr) |
int | iupStrHasSpace (const char *str) |
int | iupStrToRGB (const char *str, unsigned char *r, unsigned char *g, unsigned char *b) |
int | iupStrToRGBA (const char *str, unsigned char *r, unsigned char *g, unsigned char *b, unsigned char *a) |
int | iupStrToInt (const char *str, int *i) |
int | iupStrToIntInt (const char *str, int *i1, int *i2, char sep) |
int | iupStrToFloat (const char *str, float *f) |
int | iupStrToFloatFloat (const char *str, float *f1, float *f2, char sep) |
int | iupStrToStrStr (const char *str, char *str1, char *str2, char sep) |
char * | iupStrFileGetExt (const char *file_name) |
char * | iupStrFileGetTitle (const char *file_name) |
char * | iupStrFileGetPath (const char *file_name) |
char * | iupStrFileMakeFileName (const char *path, const char *title) |
void | iupStrFileNameSplit (const char *filename, char *path, char *title) |
int | iupStrReplace (char *str, char src, char dst) |
void | iupStrToUnix (char *str) |
void | iupStrToMac (char *str) |
char * | iupStrToDos (const char *str) |
char * | iupStrConvertToC (const char *str) |
void | iupStrRemove (char *value, int start, int end, int dir) |
char * | iupStrInsert (const char *value, const char *insert_value, int start, int end) |
char * | iupStrProcessMnemonic (const char *str, char *c, int action) |
int iupStrEqual | ( | const char * | str1, | |
const char * | str2 | |||
) |
Returns a non zero value if the two strings are equal. str1 or str2 can be NULL.
int iupStrEqualNoCase | ( | const char * | str1, | |
const char * | str2 | |||
) |
Returns a non zero value if the two strings are equal but ignores case. str1 or str2 can be NULL.
int iupStrEqualPartial | ( | const char * | str1, | |
const char * | str2 | |||
) |
Returns a non zero value if the two strings are equal up to a number of characters defined by the strlen of the second string. str1 or str2 can be NULL.
int iupStrBoolean | ( | const char * | str | ) |
Returns 1 if the string is "1", "YES", "ON" or "TRUE".
Returns 0 otherwise.
int iupStrFalse | ( | const char * | str | ) |
Returns 1 if the string is "NO", "OFF" or "FALSE".
Returns 0 otherwise.
int iupStrLineCount | ( | const char * | str | ) |
Returns the number of lines in a string. It works for UNIX, DOS and MAC line ends.
const char* iupStrNextLine | ( | const char * | str, | |
int * | len | |||
) |
Returns the a pointer to the next line and the size of the current line. It works for UNIX, DOS and MAC line ends. The size does not includes the line end. If str is NULL it will return NULL.
int iupStrCountChar | ( | const char * | str, | |
int | c | |||
) |
Returns the number of repetitions of the character occours in the string.
char* iupStrDup | ( | const char * | str | ) |
Returns a copy of the given string. If str is NULL it will return NULL.
char* iupStrCopyUntil | ( | char ** | str, | |
int | c | |||
) |
Returns a new string containing a copy of the string up to the character. The string is then incremented to after the position of the character.
void iupStrCopyN | ( | char * | dst_str, | |
int | dst_max_size, | |||
const char * | src_str | |||
) |
Copy the string to the buffer, but limited to the max_size of the buffer. buffer is always porperly ended.
char* iupStrGetMemory | ( | int | size | ) |
Returns a buffer with the specified size+1.
The buffer is resused after 50 calls. It must NOT be freed. Use size=-1 to free all the internal buffers.
char* iupStrGetMemoryCopy | ( | const char * | str | ) |
Returns a buffer that contains a copy of the given buffer using iupStrGetMemory.
void iupStrLower | ( | char * | dstr, | |
const char * | sstr | |||
) |
Converts a string into lower case. Can be used in-place.
void iupStrUpper | ( | char * | dstr, | |
const char * | sstr | |||
) |
Converts a string into upper case. Can be used in-place.
int iupStrHasSpace | ( | const char * | str | ) |
Checks if the string has at least 1 space character.
int iupStrToRGB | ( | const char * | str, | |
unsigned char * | r, | |||
unsigned char * | g, | |||
unsigned char * | b | |||
) |
Extract a RGB triple from the string. Returns 0 or 1.
int iupStrToRGBA | ( | const char * | str, | |
unsigned char * | r, | |||
unsigned char * | g, | |||
unsigned char * | b, | |||
unsigned char * | a | |||
) |
Extract a RGBA quad from the string, alpha is optional. Returns 0, 3 or 4.
int iupStrToInt | ( | const char * | str, | |
int * | i | |||
) |
Converts the string to an int. The string must contains only the integer value. Returns a a non zero value if sucessfull.
int iupStrToIntInt | ( | const char * | str, | |
int * | i1, | |||
int * | i2, | |||
char | sep | |||
) |
Converts the string to two int. The string must contains two integer values in sequence, separated by the given character (usually 'x' or ':'). Returns the number of converted values. Values not extracted are not changed.
int iupStrToFloat | ( | const char * | str, | |
float * | f | |||
) |
Converts the string to an float. The string must contains only the real value. Returns a a non zero value if sucessfull.
int iupStrToFloatFloat | ( | const char * | str, | |
float * | f1, | |||
float * | f2, | |||
char | sep | |||
) |
Converts the string to two float. The string must contains two real values in sequence, separated by the given character (usually 'x' or ':'). Returns the number of converted values. Values not extracted are not changed.
int iupStrToStrStr | ( | const char * | str, | |
char * | str1, | |||
char * | str2, | |||
char | sep | |||
) |
Extract two strings from the string. separated by the given character (usually 'x' or ':'). Returns the number of converted values. Values not extracted are not changed.
char* iupStrFileGetExt | ( | const char * | file_name | ) |
Returns the file extension of a file name. Supports UNIX and Windows directory separators.
char* iupStrFileGetTitle | ( | const char * | file_name | ) |
Returns the file title of a file name. Supports UNIX and Windows directory separators.
char* iupStrFileGetPath | ( | const char * | file_name | ) |
Returns the file path of a file name. Supports UNIX and Windows directory separators.
char* iupStrFileMakeFileName | ( | const char * | path, | |
const char * | title | |||
) |
Concat path and title addind '/' between if path does not have it.
void iupStrFileNameSplit | ( | const char * | filename, | |
char * | path, | |||
char * | title | |||
) |
Split the filename in path and title using pre-alocated strings.
int iupStrReplace | ( | char * | str, | |
char | src, | |||
char | dst | |||
) |
Replace a character in a string. Returns the number of occurrences.
void iupStrToUnix | ( | char * | str | ) |
Convert line ends to UNIX format in-place (one
per line).
void iupStrToMac | ( | char * | str | ) |
Convert line ends to MAC format in-place (one per line).
char* iupStrToDos | ( | const char * | str | ) |
Convert line ends to DOS/Windows format (the sequence
per line). If returned pointer different the input, it must be freed.
char* iupStrConvertToC | ( | const char * | str | ) |
Convert string to C format. Process
, and . If returned pointer different the input, it must be freed.
void iupStrRemove | ( | char * | value, | |
int | start, | |||
int | end, | |||
int | dir | |||
) |
Remove the interval from the string. Done in-place.
char* iupStrInsert | ( | const char * | value, | |
const char * | insert_value, | |||
int | start, | |||
int | end | |||
) |
Remove the interval from the string and insert the new string at the start.
char* iupStrProcessMnemonic | ( | const char * | str, | |
char * | c, | |||
int | action | |||
) |
Process the mnemonic in the string. If not found returns str. If found returns a new string. Action can be: