I think i found a bug in 'split - at'

스크린샷(427)

(space is marked as _)
inputs are : “/a/b/” , “/a/b//_” , “/a/b//_/” , “b/////_”
I expected : ["", “a”, “b”, “”] , ["", “a”, “b”, “”, “_”] , ["", “a”, “b”, “”,"_", “”] , [“b”, “”, “”, “”, “”, “_”]
result : ["", “a”, “b”] , ["", “a”, “b”, “”, “_”] , ["", “a”, “b”, “”, “_”] , [“b”, “”, “”, “”, “”, “_”]


input : “b/////_” , “b/////”
i expected : [“b”, “”, “”, “”, “”, “_”] , [“b”, “”, “”, “”, “”, “”]
result : [“b”, “”, “”, “”, “”, " "] , [“b”]

split-at block ignores the separator, when it comes at last without any text. I was kinda not sure if this was deliberate behavior so i did some tests, as in picture above

still not sure if this is deliberate, but kinda i wish it works also when last place without text.

I tried other separators like comma or alphabet and it was just same

1 Like

and with a bit of effort, you can workaround it

1 Like

The split text at block is a wrapper around Java’s String.split method. The details of how it splits strings can be read here. The block is behaving as intended, even if it is initially unintuitive.

1 Like