MPD: util/SplitString.hxx File Reference

MPD 0.20.15

Functions
SplitString.hxx File Reference
`#include <forward_list>`
`#include <string>`
Include dependency graph for SplitString.hxx:

Go to the source code of this file.

## Functions
std::forward_list< std::string > | SplitString (const char *s, char separator, bool strip=true)
| Split a string at a certain separator character into sub strings and returns a list of these. More...

## Function Documentation

## ◆ SplitString()

std::forward_list<std::string> SplitString | ( | const char * | s,
|  | char | separator,
|  | bool | strip = `true`
| ) |  |

Split a string at a certain separator character into sub strings and returns a list of these.

Two consecutive separator characters result in an empty string in the list.

An empty input string, as a special case, results in an empty list (and not a list with an empty string).