Loading collection data...
Collections are a way for you to organize kata so that you can create your own training routines. Every collection you create is public and automatically sharable with other warriors. After you have added a few kata to a collection you and others can train on the kata contained within the collection.
Get started now by creating a new collection.
While the current tests are comprehensive, the following could add even more robustness:
Empty String:
Test splitting an empty string: split("", ' ').
Expected result (strip = false): {""}.
Expected result (strip = true): {}.
Single Character Input:
split("a", ' ') should return {"a"}.
split("-", '-') should return {"", ""} for strip = false and {} for strip = true.
Buffer Size:
Verify behavior with long tokens exceeding BUFFER_SIZE to ensure correct truncation.
Example: split(std::string(70, 'a') + ",b", ',', false).
Non-Printable Delimiters:
Test with special characters like \t (tab) or \n (newline).
using
string
as a parameter name is bad practice because it overwrites thestring
moduleAh, we've gone full circle now.
magic
:-) note the fmt::join up there is IMHO canonical in the 21rst century..
Know your STL and get rid of those for loops.
YEEEAAHHHHHH this one is excellent!!!
For F... Sake YOU SURE KNOW YOUR STL!!
As for me... I'm tired of typing "fmt/ranges" as well as "rangeV3/anyalgo" ... when using format or ranges or views... Keep to C++17
We need a C++20 compilant compiler there !!
Finally, the universal C++ solution after 16 months of the original kumite. (15 months since my C++ translation.)
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution
This comment is hidden because it contains spoiler information about the solution