lua-users home
lua-l archive

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


>When getting null-terminated strings from Lua, does lua_strlen() offer any speed advantage over regular strlen() calls?

If you mean strlen from the C standard library, then yes.
Moreover, the C strlen does not apply to Lua strings because
Lua strings can have embedded zeros.

If you mean strlen from the Lua string library, now called string.len, then
string.len written on top of lua_strlen.

>Does anyone here know that for sure?

By all means, use lua_strlen.
--lhf