[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: string.find
- From: "Jeff Wise" <jwise@...>
- Date: Thu, 9 Oct 2008 11:32:09 -0500
>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".