WoW Lua

Return the length, in bytes, of the string passed.


Examples Edit

s = "Lua" 
print(string.len("Lua"), s:len(), #s) -- 3,3,3; the three methods are equivalent
print(string.len("Lua\000user"))   -- 8: Lua strings are 8 bit pure so \000 does not terminate

See also Edit

  • strlenutf8 - for utf8-aware string length parsing.

Ad blocker interference detected!

Wikia is a free-to-use site that makes money from advertising. We have a modified experience for viewers using ad blockers

Wikia is not accessible if you’ve made further modifications. Remove the custom ad blocker rule(s) and the page will load as expected.