lua-users home
lua-l archive

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


>from manual:
>  string.find (s, pattern [, init [, plain]])

>so you can try buffer:find(ff, 1, true) and see if anything changes.

No change


>str = "a"
> num = 97
>=string.find("foobar", str)
>5	5
> =string.find("foobar", num)
>nil

I would expect these results because str = "a" probably makes a 2 byte
field, the "a" and "\0". I would expect "num" not to work because it is
defined as a number (num = 97). Therefore Lua would make it a float long (8
bytes?) value with mantissa and exponent.


>ff = 0x0C or ff = string.char(0x0C) ?

ff is defined as 0x0C, i.e. "local ff = 0x0C".