[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: string.byte with empty string
- From: Sam Roberts <vieuxtech@...>
- Date: Sun, 25 Jan 2009 12:41:11 -0800
On Sat, Jan 24, 2009 at 4:56 PM, Vaughan McAlley <ockegheim@gmail.com> wrote:
> OK, so to fix this problem I need to tell it exactly how many results
> I want. My function:
>
> function f(s)
> if string.byte(s) == 42 then
> -- do stuff if and only if s starts with "*"
> end
> end
Or
if string.find(s, "^*") then
-- do stuff
end
Or
if s:find("^*") then
-- do stuff
end
Sam