WoW:API strbyte: Difference between revisions
Jump to navigation
Jump to search
No edit summary |
(Use Lua/Libshortcut template. Change category from "LUA Functions" to "Lua functions".) |
||
Line 1: | Line 1: | ||
{{:Lua/Libshortcut|strbyte|string.byte}} | |||
string.byte(s [, i]) | string.byte(s [, i]) | ||
Line 11: | Line 12: | ||
{{LUA}} | |||
{{ |
Revision as of 12:15, 26 May 2006
string.byte(s [, i])
Return the numerical code the i-th character of the string passed.
> = string.byte("ABCDE") -- no index, so the first character 65 > = string.byte("ABCDE",1) -- indexes start at 1 65 > = string.byte("ABCDE",0) -- we're not using C > = string.byte("ABCDE",100) -- index out of range, no value returned