LibRCG
3.1.1
|
Implementation of functions to manipulate strings. More...
Go to the source code of this file.
Functions | |
int | trimStart (char *str) |
Removes leading whitespaces of a string. More... | |
int | trimEnd (char *str) |
Removes trailing whitespaces of a string. More... | |
int | trim (char *str) |
Removes leading and trailing whitespaces of a string, as well as consecutive whitespaces in the middle of a string. More... | |
int | charElem (char c, const char *str) |
Checks if there is an occurrence of a specific character in a string. More... | |
List | words (const char *str) |
Given a string, computes the list of words that the string contains. More... | |
List | strSep (const char *str, const char *delim) |
Splits a string. More... | |
Implementation of functions to manipulate strings.
Definition in file rstring.h.
int charElem | ( | char | c, |
const char * | str | ||
) |
List strSep | ( | const char * | str, |
const char * | delim | ||
) |
Splits a string.
Computes a list of strings, each of which is a substring of the string formed by splitting it on the boundaries defined by the specified delimiters (delim
).
str | the string |
delim | the delimiters |
NULL
if an error occurredint trim | ( | char * | str | ) |
int trimEnd | ( | char * | str | ) |
int trimStart | ( | char * | str | ) |
LibRCG © 2004-2015 Rui Carlos Gonçalves