[Date Prev][Date Next][Thread Prev][Thread Next]
[Date Index]
[Thread Index]
- Subject: Re: Lua string library partially reimplemented in Lua
- From: Roberto Ierusalimschy <roberto@...>
- Date: Thu, 18 Sep 2008 13:52:46 -0300
> 2008/9/18 Roberto Ierusalimschy <roberto@inf.puc-rio.br>:
> >> (Unrelated though, but something I'd like to see in jit 2.x would be
> >> things such as "if str:sub(1, 2) == "__" then" remove the string creation
> >> and just compare the first two bytes - just because it's a fairly common
> >> operation in my code at least).
> >
> > Maybe this should deserve a proper function in strlib.
>
> Isn't str:match("^__") already doing that ?
Not when the second string has magic characters.
-- Roberto