[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: [ANN] Penlight 0.9.8
- From: Petite Abeille <petite.abeille@...>
- Date: Tue, 29 Nov 2011 19:21:33 +0100
On Nov 29, 2011, at 9:21 AM, steve donovan wrote:
> [1] http://stevedonovan.github.com/Penlight/
Nicely done.
The extensive Penlight treatise mentions "File-style I/O on Strings". Which is nice.
Would anyone have the reverse? String-style methods on Files?
E.g.:
local aFile = io.open( 'test.txt', 'rb' )
if aFile:find( 'foo', 1, true ) do
...
end
In other words, string methods [2] working in terms of a file object? :)
[1] http://stevedonovan.github.com/Penlight/#T18
[2] http://www.lua.org/manual/5.1/manual.html#5.4