IUP: String Utilities

IUP - Portable User Interface

String Utilities
[Utilities]


Detailed Description

See iup_str.h


Functions

char * iupStrDup (const char *str)
int iupStrEqual (const char *str1, const char *str2)
int iupStrEqualNoCase (const char *str1, const char *str2)
int iupStrEqualPartial (const char *str1, const char *str2)
void iupStrLineCount (const char *str, int *max_len, int *num_lin)
const char * iupStrNextLine (const char *str, int *len)
int iupStrCountChar (const char *str, int c)
char * iupStrCopyUntil (char **str, int c)
char * iupStrGetMemory (int size)
void iupStrLower (char *dstr, const char *sstr)
int iupStrGetRGB (const char *value, unsigned char *r, unsigned char *g, unsigned char *b)

Function Documentation

char* iupStrDup const char *  str  ) 
 

Returns a copy of the given string. If str is NULL it will return NULL.

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.

void iupStrLineCount const char *  str,
int *  max_len,
int *  num_lin
 

Returns the number of lines and the size of the largest line in a string. Detects also CR/LF pairs.

const char* iupStrNextLine const char *  str,
int *  len
 

Returns the a pointer to the next line and the size of the current line. Detects also CR/LF pairs. 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* 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.

char* iupStrGetMemory int  size  ) 
 

Returns a buffer with the specified size+1.
The buffer is resused after 10 calls. It must NOT be freed. Use size=-1 to free all the internal buffers.

void iupStrLower char *  dstr,
const char *  sstr
 

Converts a string into lower case.

int iupStrGetRGB const char *  value,
unsigned char *  r,
unsigned char *  g,
unsigned char *  b
 

Extract a RGB triple from the string.