Explode



Convert string into array splitting by specified dilimiter. Result parts are without dilimiter.

You can find more information in comments below.

/**
Explode string by specified delimiter and put parts into specified output
@param str String to exploding
@param delimiter Exploding delimiter
@param[out] out Vector of string parts
@param remove_empty Indicates if empty parts should be removed. Default is true
*/
void Explode(const String &str, const String &delimiter, std::vector<String> &out, const bool remove_empty = true);
/**
Explode ansi string by specified delimiter and put parts into specified output
@param str String to exploding
@param delimiter Exploding delimiter
@param[out] out Vector of string parts
@param remove_empty Indicates if empty parts should be removed. Default is true
*/
void Explode(const AnsiString &str, const AnsiString &delimiter, std::vector<AnsiString> &out, const bool remove_empty = true);
/**
Explode string by specified delimiter and return result(less efficient than version without result due to twice copying)
@param str String to exploding
@param delimiter Exploding delimiter
@param remove_empty Indicates if empty parts should be removed. Default is true
@return Vector of string parts
*/
std::vector<String> Explode(const String &str, const String &delimiter, const bool remove_empty = true);
/**
Explode ansi string by specified delimiter and return result(less efficient than version without result due to twice copying)
@param str String to exploding
@param delimiter Exploding delimiter
@param remove_empty Indicates if empty parts should be removed. Default is true
@return Vector of string parts
*/
std::vector<AnsiString> Explode(const AnsiString &str, const AnsiString &delimiter, const bool remove_empty = true);
Namespace: nitisa
Include: Nitisa/Core/Strings.h