[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: reverse find
- From: "Brian Weed" <bw@...>
- Date: Wed, 25 Jan 2006 14:17:07 -0500
Is there a library function for a reverse find, or do I have to do it
manually as in:
-- untested
i = 0
do
i = i - 1
p = string.find(s, ".", i, true)
while (p == nil and i ~= -string.len(s))
(I'm searching for the file extension, and there may be other dots in
the filename)
Brian