2 Oct 2003 00:52
Re: splitting string with null string
dai <inukai.d <at> jeans.ocn.ne.jp>
2003-10-01 22:52:56 GMT
2003-10-01 22:52:56 GMT
Hi, this is dai inukai.
Seems reasonable for me the procedure returns #f or the given
arguement itself and more reasonable if the procedure returns the
given arguement as is from my viewpoint that the null string matches
nothing.
The latter seems more reasonable because the returned #f is, in my
opinion, apt to lead to an error judgement and to prevent the program
from going ahead while it encourages the program to think and behave
the best it can do.
Alex Shinn worte:
> SCM returns #("abc") like Chicken (but as a vector), and also reverses
> the order of the arguments. For (string-split "/" "/a/b/c/") it gives
> #("" "a" "b" "c") including the leading but not trailing null string.
>
> G
This is not the SCM behaviour but that of the POSIX regex function it
calls. The returned value changes depending on the library it calls.
dai -- http://www4.ocn.ne.jp/~inukai/
-------------------------------------------------------
This sf.net email is sponsored by:ThinkGeek
Welcome to geek heaven.
http://thinkgeek.com/sf
(Continue reading)
RSS Feed