You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
But it should handle the two consecutive separators correctly, and print:
Size: 4
1 2 4
(i.e., the 3rd piece is the empty string).
The trim flag does not affect this behaviour, except that it's actually worse: for a string "1|2| |4" it seems to trim first, and then decide to ignore the empty 3rd piece, and print the size as 3, and the pieces as the incorrect example above.
The text was updated successfully, but these errors were encountered:
Yes it's correct. I am considering introducing a deprecation system. But, for the moment, it will bring more complications than benefits. In general, the public API is quite stable.
The function
str_splits
does not work with empty splits. This works:it prints
However, this does not:
It prints:
But it should handle the two consecutive separators correctly, and print:
(i.e., the 3rd piece is the empty string).
The trim flag does not affect this behaviour, except that it's actually worse: for a string
"1|2| |4"
it seems to trim first, and then decide to ignore the empty 3rd piece, and print the size as 3, and the pieces as the incorrect example above.The text was updated successfully, but these errors were encountered: