'explode' error

Started by Fanda, July 27, 2007, 06:17:18 AM

Previous topic - Next topic

Fanda

Hello Lutz!



Function 'explode' returns strange results when exploding strings and using numbers bigger than the length of a string:



> (explode "abc" 1)
("a" "b" "c")
> (explode "abc" 2)
("ab" "c")
> (explode "abc" 3)
("abc")
> (explode "abc" 4)
("abc00")
> (explode "abc" 5)
("abc0000")
> (explode "abc" 6)
("abc000002")
> (explode "abc" 7)
("abc000002=")
> (explode "abc" 8)
("abc000002=00")
> (explode "abc" 9)
CRASH

(explode "abc" 10)
("abc00k00=0013000")


Exploding lists works ok.



Fanda

Lutz

#1
Quoteusing numbers bigger than the length of a string


thanks, I will look into it.



Lutz