[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: table.join -> string.split?
- From: Luiz Henrique de Figueiredo <lhf@...>
- Date: Tue, 19 Nov 2002 11:14:48 -0200
>I could not find a function to split a string into a table
Probably because there are many ways to split a string. The workhorse will be
gsub. Here is an example from the reference manual:
t = {n=0}
gsub("first second word", "(%w+)", function (w) tinsert(%t, w) end)
--> t={"first", "second", "word"; n=3}
--lhf