Home  Contents

string.cstr

String Core4 Lua Commands

SYNOPSIS

result = string.cstr(s [, i [, j]])

DESCRIPTION

Returns the substring s[i], s[i+1], ···, s[j] truncated at the first NUL character (if any).
The default value for i is 1; the default value for j is the number of characters in s.

RETURN VALUE

Returns a string.

EXAMPLE

print(string.cstr("1234\x005678")
1234