Subject: Re: strsplit does not conform to documentation (PR#379)
From: Peter Dalgaard BSA (firstname.lastname@example.org)
Date: Sun 19 Dec 1999 - 06:28:51 EST
> Split the Strings in `x' into substrings according to
> the presence of substring `split' within them.
> Apparently, it will
> Split the Strings in `x' into substrings according to the presence of
> ANY CHARACTER FOUND IN substring `split'.
> Was this intended? I expected, as the documentation implies that the
> result from above would be:
> "acbdefg" "higkilmnSpPqrst"
Yes it was intended. Strsplit interfaces to the strtok() C routine,
char *strtok(char *s, const char *delim);
A `token' is a nonempty string of characters not occurring
in the string delim, followed by \0 or by a character
occurring in delim.
and `split' gets passed as `delim'. The documentation is bad, though.
-- O__ ---- Peter Dalgaard Blegdamsvej 3 c/ /'_ --- Dept. of Biostatistics 2200 Cph. N (*) \(*) -- University of Copenhagen Denmark Ph: (+45) 35327918 ~~~~~~~~~~ - (email@example.com) FAX: (+45) 35327907 -.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.-.- r-devel mailing list -- Read http://www.ci.tuwien.ac.at/~hornik/R/R-FAQ.html Send "info", "help", or "[un]subscribe" (in the "body", not the subject !) To: firstname.lastname@example.org _._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._._
This archive was generated by hypermail 2b25 : Tue 04 Jan 2000 - 14:16:11 EST