lua-users home
lua-l archive

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


> I forgot the 'i':
> 
> if str:find('^'..sub,i) then ... end

This is seems faster than my suggestion but it does create a new string,
which the OP seems to want to avoid. My suggestion can be slow if str is
*very* long.