nanos world API Reference Unofficial documentation
Function Shared Native

string.byte

Returns the internal numeric codes of the characters <code>s[start_pos], s[start_pos + 1], ..., s[end_pos]</code>

Syntax

Lua
string.byte(start_pos = 1, end_pos = start_pos)

Parameters

Name Type Default Description
start_pos optional integer 1 The first character of the string to get the byte of
end_pos optional integer start_pos The last character of the string to get the byte of

Returns

  • integer... the internal numeric code