util::SplitString

Split a string on a single separator character, returning strings.

Synopsis

Declared in <util/string.h>

[[nodiscard]]
std::vector<std::string>
SplitString(
    std::string_view str,
    char sep);

Return Value

The pieces of str between occurrences of sep.

NOTE

The return value should not be discarded.

Parameters

NameDescription
strInput string to split.
sepSeparator character.