pop on strings
Posted: Mon Jan 22, 2007 8:45 pm
Im realy lost now !
It seems POP makes up its own mind when to POP an element or just pop away.. ;-)
( syntax: (pop str [int-index] [int-length]))
> (setq t "1234567890")
"1234567890"
> (pop t 1)
"2"
> t
"134567890"
> (pop t 1)
"3"
> t
"14567890"
> (pop t 1)
"4"
> t
"1567890"
> (pop t 4)
"890"
> t
"1567"
>
I realy did expect to see an "8" and not a "890" here...
It seems POP makes up its own mind when to POP an element or just pop away.. ;-)
( syntax: (pop str [int-index] [int-length]))
> (setq t "1234567890")
"1234567890"
> (pop t 1)
"2"
> t
"134567890"
> (pop t 1)
"3"
> t
"14567890"
> (pop t 1)
"4"
> t
"1567890"
> (pop t 4)
"890"
> t
"1567"
>
I realy did expect to see an "8" and not a "890" here...