|
template<typename CONTAINER > |
static std::string | kodi::tools::StringUtils::Join (const CONTAINER &strings, const std::string &delimiter) |
| Concatenates the elements of a specified array or the members of a collection and uses the specified separator between each element or member.
|
|
static std::vector< std::string > | kodi::tools::StringUtils::Split (const std::string &input, const std::string &delimiter, unsigned int iMaxStrings=0) |
| Splits the given input string using the given delimiter into separate strings.
|
|
static std::vector< std::string > | kodi::tools::StringUtils::Split (const std::string &input, const char delimiter, int iMaxStrings=0) |
| Splits the given input string using the given delimiter into separate strings.
|
|
static std::vector< std::string > | kodi::tools::StringUtils::Split (const std::string &input, const std::vector< std::string > &delimiters) |
| Splits the given input string using the given delimiter into separate strings.
|
|
template<typename OutputIt > |
static OutputIt | kodi::tools::StringUtils::SplitTo (OutputIt d_first, const std::string &input, const std::string &delimiter, unsigned int iMaxStrings=0) |
| Splits the given input string using the given delimiter into separate strings.
|
|
template<typename OutputIt > |
static OutputIt | kodi::tools::StringUtils::SplitTo (OutputIt d_first, const std::string &input, const char delimiter, int iMaxStrings=0) |
| Splits the given input string using the given delimiter into separate strings.
|
|
template<typename OutputIt > |
static OutputIt | kodi::tools::StringUtils::SplitTo (OutputIt d_first, const std::string &input, const std::vector< std::string > &delimiters) |
| Splits the given input string using the given delimiter into separate strings.
|
|
static std::vector< std::string > | kodi::tools::StringUtils::SplitMulti (const std::vector< std::string > &input, const std::vector< std::string > &delimiters, unsigned int iMaxStrings=0) |
| Splits the given input strings using the given delimiters into further separate strings.
|
|
static std::vector< std::string > | kodi::tools::StringUtils::Tokenize (const std::string &input, const std::string &delimiters) |
| Split a string by the specified delimiters.
|
|
static void | kodi::tools::StringUtils::Tokenize (const std::string &input, std::vector< std::string > &tokens, const std::string &delimiters) |
| Tokenizing a string denotes splitting a string with respect to a delimiter.
|
|
static std::vector< std::string > | kodi::tools::StringUtils::Tokenize (const std::string &input, const char delimiter) |
| Tokenizing a string denotes splitting a string with respect to a delimiter.
|
|
static void | kodi::tools::StringUtils::Tokenize (const std::string &input, std::vector< std::string > &tokens, const char delimiter) |
| Tokenizing a string denotes splitting a string with respect to a delimiter.
|
|
static std::vector< std::string > kodi::tools::StringUtils::SplitMulti |
( |
const std::vector< std::string > & | input, |
|
|
const std::vector< std::string > & | delimiters, |
|
|
unsigned int | iMaxStrings = 0 ) |
|
inlinestatic |
Splits the given input strings using the given delimiters into further separate strings.
If the given input string vector is empty the result will be an empty array (not an array containing an empty string).
Delimiter strings are applied in order, so once the (optional) maximum number of items is produced no other delimiters are applied. This produces different results to applying all delimiters at once e.g. "a/b#c/d" becomes "a", "b#c", "d" rather than "a", "b", "c/d"
- Parameters
-
[in] | input | Input vector of strings each to be split |
[in] | delimiters | Delimiter strings to be used to split the input strings |
[in] | iMaxStrings | [opt] Maximum number of resulting split strings |
- Returns
- List of splitted strings