util::SplitString

Split a string on any of the given separator characters, returning strings.

Synopsis

Declared in <util/string.h>

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

Return Value

The pieces of str between separators.

NOTE

The return value should not be discarded.

Parameters

NameDescription
strInput string to split.
separatorsSet of characters, any of which splits the input.