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).
This comment has been reported as abusive
This comment has been reported as abusive
This comment has been reported as abusive