On Tue, 17 Dec 2019, Sven Schreiber wrote:
I'm observing this unexpected behavior:
<hansl>
string test = sprintf("Hey \n ho \n ?")
eval strsplit(test) # 3-elem array, as expected
eval strsplit(test, sprintf("\n")) # only 2 elems!?
</hansl>
A bug, now fixed in git. Current output is:
? eval strsplit(test)
Array of strings, length 3
[1] "Hey"
[2] "ho"
[3] "?"
? eval strsplit(test, sprintf("\n"))
Array of strings, length 3
[1] "Hey "
[2] " ho "
[3] " ?"
The results are not the same, of course, but the number of elements
in the split is correct, and the same in the two cases.
Allin