Closed Crutiatix closed 6 years ago
Mmmm yep, you are right:
split
is most definitely a bugIf I get a chance this weekend I will fix the split
method and also maybe implement a new substr
operator for slicing strings.
I am thinking of something like:
"wonderful" 0 6 substr
...which would output wonder
.
I can't find any way how to slice string. There isn't any function in the str module for this purpose.
My idea was at first to split a string a char by char into strings in a quote and then get or slice it by functions from seq module however when I try to do so system gets stuck as if it gets into endless loop. The problem is propably that I wanted to split string by empty string:
How can I slice string by another way? (by which I don't have to insert delimiters between every char)
Thanks