Re: string.lines (a suggestion)
[
Date Prev][
Date Next][
Thread Prev][
Thread Next]
[
Date Index]
[
Thread Index]
- Subject: Re: string.lines (a suggestion)
- From: Asko Kauppi <asko.kauppi@...>
- Date: 2004年7月28日 02:32:58 +0300
Yes, exactly. :)
It probably does the job, but -honestly- I've never even used 'gfind'
before.. The point is, Lua should be intuitive and straightforward,
and "for line in string.lines(str)" was the first thing I'd try just by
guessing..
In fact, why have separate 'string.lines()' and 'io.lines()'. Just
'lines()' as there's currently 'pairs()' and 'ipairs()' would do!
It's not the question it couldn't be done (I already did, with a clumsy
for loop). It's a question on how cleanly it could be done. Sorry to
say :) but your example looks like Perl.. (no offense)
-ak
28.7.2004 kello 01:41, Jamie Webb kirjoitti:
Won't string.gfind("[^\n]+") do?