Ad
  • Custom User Avatar

    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).

  • Custom User Avatar

    This comment has been reported as abusive

  • Custom User Avatar

    This comment has been reported as abusive

  • Custom User Avatar

    This comment has been reported as abusive