support/StringUtils.h File Reference


Detailed Description

Additional string utilities.

#include <support/String.h>
#include <support/Vector.h>

Go to the source code of this file.

String Utilities

status_t StringSplit (const char *srcStr, int32_t srcStrLen, const char *splitOn, int32_t splitOnLen, SVector< SString > *strList, bool append=false)
 Fills the strList vector with the list of string created by splitting the string on splitOn.
status_t StringSplit (const SString &srcStr, const SString &splitOn, SVector< SString > *strList, bool append=false)
 Fills the strList vector with the list of string created by splitting the string on splitOn.


Function Documentation

status_t StringSplit const char *  srcStr,
int32_t  srcStrLen,
const char *  splitOn,
int32_t  splitOnLen,
SVector< SString > *  strList,
bool  append = false
 

Fills the strList vector with the list of string created by splitting the string on splitOn.

Splits the string into a vector of strings that are seperated by the splitOn string. If the append parameter is set to true then the strList parameter will be appended. If the append parameter is false then MakeEmpty is call on strList before it is filled with the split apart strings. The splitOnLen parameter is the length of the splitOn string not including the null terminating zero. You can use strlen to get the correct length to pass for this parameter.

status_t StringSplit const SString srcStr,
const SString splitOn,
SVector< SString > *  strList,
bool  append = false
 

Fills the strList vector with the list of string created by splitting the string on splitOn.

Splits the string into a vector of string that are seperated by the splitOn string. If the append parameter is set to true then the strList parameter will be appended. If the append parameter is false then MakeEmpty is call on strList before it is filled with the split apart strings.