Splitting string that contains consecutive delimiters#14
Splitting string that contains consecutive delimiters#14moltenform wants to merge 1 commit intowebsnarf:masterfrom
Conversation
Expected behavior:
split("a SPLITSPLIT b", "SPLIT") ---> ["a ", "", " b"]
Observed behavior:
split("a SPLITSPLIT b", "SPLIT") ---> ["a ", "SPLIT b"]
Within the loop in bsplitstrcb, i is sent too far forward
upon finding a match. Here is a proposed fix including tests,
open to suggestions. A few more details in the GH pull request.
|
Splitting string containing consecutive delimiters gives unexpected results Expected behavior: For me, this is not the expected behavior. Precise example: Proposed fix attached, but open to suggestions |
Expected behavior:
split("a SPLITSPLIT b", "SPLIT") ---> ["a ", "", " b"]
Observed behavior:
split("a SPLITSPLIT b", "SPLIT") ---> ["a ", "SPLIT b"]
Within the loop in bsplitstrcb, i is sent too far forward
upon finding a match. Here is a proposed fix including tests,
open to suggestions. A few more details in the GH pull request.