Revision Difference
string.GetChar#515966
<function name="GetChar" parent="string" type="libraryfunc">
<description><deprecated>Use either string.sub(str, index, index) or str[index].</deprecated> Returns char value from the specified index in the supplied string.</description>
<realm>Shared and Menu</realm>
<file line="295">lua/includes/extensions/string.lua</file>
<args>
<arg name="str" type="string">The string that you will be searching with the supplied index.</arg>
<arg name="index" type="number">The index's value of the string to be returned.</arg>
</args>
<rets>
<ret name="" type="string">str</ret>
</rets>
</function>
⤶
{{Example⤶
| Description = Looks index in the supplied string and returns value of that index.⤶
| Code =⤶
⤶
<example>⤶
<description>Looks index in the supplied string and returns value of that index.</description>⤶
<code>⤶
local char = "ABC"
print(string.GetChar(char, 2))
| Output = ⤶
⤶
⤶
B⤶
}} </code>⤶
<output>B</output>⤶
⤶
</example>