Hacker News new | ask | show | jobs
by jeffbee 1198 days ago
That's just strtok, and programming C++ as if you are an unreformed C programmer is always a mistake. If you want to not copy the strings, string_view. We also have std::split and std::views::split etc.
1 comments

To prevent any misunderstandings, programming C using strtok is a mistake too.