Skip to content

Rose::StringUtility::split

Splits strings into parts.

Synopses

Declared in <src/Rose/StringUtility/SplitJoin.h>

[[visibility]]
std::vector<std::string>
split(
    char separator,
    std::string const& str,
    size_t maxparts = UNLIMITED,
    bool trim_white_space = false);

Splits strings into parts.

[[visibility]]
std::vector<std::string>
split(
    std::string const& separator,
    std::string const& str,
    size_t maxparts = UNLIMITED,
    bool trim_white_space = false);

Return Value

List of substrings.

Parameters

Name

Description

separator

Separator string.

str

Input string.

maxparts

Maximum number of parts.

trim_white_space

Trim whitespace in parts.

Created with MrDocs