WoW:API strbyte

From AddOn Studio
Revision as of 02:46, 14 February 2005 by WoWWiki>Sparsematrix
(diff) ← Older revision | Latest revision (diff) | Newer revision → (diff)
Jump to navigation Jump to search
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