Wikia

WoWWiki

Watchlist Recent changes

API strlen

Main Menue



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

string.len(s)
strlen(s)

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.

Pages on WoWWiki

94,146pages on
this wiki
Advertisement | Your ad here

Latest Photos

Add a Photo
55,612photos on this wiki
See more >

Recent Wiki Activity

See more >

Recent Questions

Around Wikia's network

Random Wiki