Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

There's been this since 1998, likely earlier:

    std::vector<std::string> split(const std::string& text, char delimiter) {
        std::vector<std::string> parts;
        std::istringstream stream(text);
        std::string part;
        while (std::getline(stream, part, delimiter)) {
            parts.push_back(part);
        }
        return parts;
    }


Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: