Fri Jun 11 00:43:54 CEST 2004
"Robert Virding" <> wrote:
>What is string:join supposed to do? If it just a simple concatenation of two
>strings then S1 ++ S2 well defined and efficient.
'man perlfunc' (ducking:-)
join(List, Sep) ->
lists:foldl(fun(A, "") -> A;
(A, Acc) -> Acc ++ Sep ++ A
end, "", List).
"The opposite of string:tokens/2" (sort of).
Or at least that's what I assume... (And I agree that it's "missing".:-)
>----- Original Message -----
>From: "David N. Welton" <>
>Sent: Wednesday, June 09, 2004 4:12 PM
>Subject: string:join ?
>> I was looking through the docs and didn't notice a string:join function.
>> It would be, IMHO, a useful little utility. I've written my own,
>> but I think it's a common enough operation that "leaving it as an
>> excersize for the reader" might not be optimal.
>> David N. Welton
More information about the erlang-questions