Skip to content
everloot

Lore archive · Warcraft Wiki, 2023 dump

API strlen

Last wiki revision 2022-08-03

Return the length, in bytes, of the string passed. string.len(s) strlen(s)

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

  • - for utf8-aware string length parsing.

Source

https://warcraft.wiki.gg/wiki/API_strlen · retrieved 2023-11-13 · CC BY-SA 4.0

Converted from wikitext with templates, tables and images removed, so some sentences may be missing values.

This archive predates WoW: Forever. For collected gameplay facts see the Forever database. Search the archive.