Ecore_Str.h File Reference

Contains useful C string functions. More...


Functions

EAPI char ** ecore_str_split (const char *string, const char *delimiter, int max_tokens)
 Splits a string into a maximum of max_tokens pieces, using the given delimiter.


Detailed Description

Contains useful C string functions.


Function Documentation

EAPI char** ecore_str_split ( const char *  str,
const char *  delim,
int  max_tokens 
)

Splits a string into a maximum of max_tokens pieces, using the given delimiter.

If max_tokens is reached, the final string in the returned string array contains the remainder of string.

Parameters:
str A string to split.
delim A string which specifies the places at which to split the string. The delimiter is not included in any of the resulting strings, unless max_tokens is reached.
max_tokens The maximum number of strings to split string into. If this is less than 1, the string is split completely.
Returns:
A newly-allocated NULL-terminated array of strings. To free it: free the first element of the array and the array itself.