News for hackers. Stuff that matters.
Re:Effortless Performance Improvements in C++: std:vector by jeffbee on Wednesday March 08, 2023 @05:14PM (#35075495)
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.
Re:Effortless Performance Improvements in C++: std:vector by jstimpfle on Wednesday March 08, 2023 @06:28PM (#35076210)
To prevent any misunderstandings, programming C using strtok is a mistake too.