lua-users home
lua-l archive

[Date Prev][Date Next][Thread Prev][Thread Next] [Date Index] [Thread Index]


On Thu, 9 Oct 2008 09:53:17 -0500
"Jeff Wise" <jwise@sealyrealty.com> wrote:

> I have a Lua function that includes:
> 
>   local s = string.find(buffer, ff)
> 
> The ff is defined as 0x0C (a form feed), and is a "special
> character". The find is "finding" form feeds where there are none (as
> verified with a hex editor). Is there a problem in using this string
> function for finding special characters? If so, how do I search
> buffer for a form feed? 
from manual:
  string.find (s, pattern [, init [, plain]])

so you can try buffer:find(ff, 1, true) and see if anything changes.
this will turn off Lua "pattern matching" and perform a simple
substring search.