Category : performance

I was thinking about this common situation in C++ code: std::string my_string { "I am just a demostration string" }; std::vector<string> my_vector_of_strings; split_by_delimiter(my_string, ‘ ‘, my_vector_of_strings); Now I can think on the split by delimiter signature in three ways. Way Nº 1: void split_by_delimiter(const std::string& input, char delimiter, std::vector<string>& output) { // construct a stream ..

Read more