<div dir="ltr">2008/10/9 Richard O'Keefe <span dir="ltr"><<a href="mailto:ok@cs.otago.ac.nz">ok@cs.otago.ac.nz</a>></span><br><div class="gmail_quote"><blockquote class="gmail_quote" style="border-left: 1px solid rgb(204, 204, 204); margin: 0pt 0pt 0pt 0.8ex; padding-left: 1ex;">
<br>
(3) unjoin:unjoin(";;;abc;;de;f;g;;", ";;").<br>
     [[],";abc","de;f;g",[]]<br>
<br>
     Is that the right answer, or should it be<br>
     [";","abc","de;f;g",[]]?</blockquote><div><br>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.<br>
<br>Your first example is start/end with data, while your second is start/end with separator.<br><br></div>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 inverses.<br>
<br>Robert<br><br></div></div>