[erlang-questions] [enhancement] string:split/2
Thu Oct 9 11:54:13 CEST 2008
2008/10/9 Richard O'Keefe <ok@REDACTED>
> (3) unjoin:unjoin(";;;abc;;de;f;g;;", ";;").
> Is that the right answer, or should it be
Either, depending on how you define your string. It could either start/end
with a separator, or start/end with data. The important thing is to define
it and should be the same at either end. For example regular expression
libraries often have start/end with data.
Your first example is start/end with data, while your second is start/end
I would personally prefer the name split even though unjoin might more
correct. Looking at the documentation for string:join it is start/end data
so I definitely feel that split/unjoin should do the same so that they are
-------------- next part --------------
An HTML attachment was scrubbed...
More information about the erlang-questions