LUA_PUSHLSTRING(3) Library Functions Manual LUA_PUSHLSTRING(3)

lua_pushlstringpushes the string onto the stack, function indicator [-0, +1, m]

#include <lua.h>

void
lua_pushlstring(lua_State *L, const char *s, size_t len);

() pushes the string pointed to by s with size len onto the stack.

Lua makes (or reuses) an internal copy of the given string, so the memory at s can be freed or reused immediately after the function returns. The string can contain embedded zeros.

Roberto Ierusalimschy, Luiz Henrique de Figueiredo, and Waldemar Celes, Lua 5.1 Reference Manual.

The lua_pushlstring() manual page is based on Lua Reference Manual 5.1 and was created by Sergey Bronnikov.

July 20, 2022 Debian