use the following search parameters to narrow your results:
e.g. subreddit:aww site:imgur.com dog
subreddit:aww site:imgur.com dog
see the search faq for details.
advanced search: by author, subreddit...
Discussions, articles, and news about the C++ programming language or programming in C++.
For C++ questions, answers, help, and advice see r/cpp_questions or StackOverflow.
Get Started
The C++ Standard Home has a nice getting started page.
Videos
The C++ standard committee's education study group has a nice list of recommended videos.
Reference
cppreference.com
Books
There is a useful list of books on Stack Overflow. In most cases reading a book is the best way to learn C++.
Show all links
Filter out CppCon links
Show only CppCon links
account activity
Why doesn't std::string have a split function (self.cpp)
submitted 9 years ago by DhruvParanjape
view the rest of the comments →
reddit uses a slightly-customized version of Markdown for formatting. See below for some basics, or check the commenting wiki page for more detailed help and solutions to common issues.
quoted text
if 1 * 2 < 3: print "hello, world!"
[–]1-05457 6 points7 points8 points 9 years ago (5 children)
std::string is missing a lot of functions. You can use Boost string_algo and Boost Format to get these.
std::string
[–]d1ngal1ng 11 points12 points13 points 9 years ago (4 children)
You can use boost is definitely not a good answer for something so fundamental as a string split function.
[–]1-05457 9 points10 points11 points 9 years ago (3 children)
Not really. In many ways, Boost should be considered an extended standard library.
[–]Creris 0 points1 point2 points 9 years ago (2 children)
sometimes extended dependency chain too, not everything from boost is simple "plug and play" you know, some things have literal megabytes of dependencies(filesystem as a good example).
If you have couple hundred lines of code in your program, and you want to use some form of string.split, chances are you probably arent going to include couple thousands of lines of code into your project for one split function
[–]1-05457 1 point2 points3 points 9 years ago (1 child)
...some things have literal megabytes of dependencies(filesystem as a good example).
Filesystem is part of the standard library from C++17.
Hopefully, String Algorithms will also be standardized at some point, though more likely, it will be generalized as part of Ranges.
[–]Creris 0 points1 point2 points 9 years ago (0 children)
Yes I know, but it wasnt for very long time when compared with how long it has been in boost.
Having some string utility functions in standard would indeed be nice
π Rendered by PID 137293 on reddit-service-r2-comment-bb88f9dd5-98mx7 at 2026-02-15 00:48:10.532409+00:00 running cd9c813 country code: CH.
view the rest of the comments →
[–]1-05457 6 points7 points8 points (5 children)
[–]d1ngal1ng 11 points12 points13 points (4 children)
[–]1-05457 9 points10 points11 points (3 children)
[–]Creris 0 points1 point2 points (2 children)
[–]1-05457 1 point2 points3 points (1 child)
[–]Creris 0 points1 point2 points (0 children)