MCPcopy Create free account
hub / github.com/EmmyLua/EmmyLuaDebugger / utfchar

Function utfchar

third-party/lua-5.3.5/src/lutf8lib.c:138–153  ·  view source on GitHub ↗

** utfchar(n1, n2, ...) -> char(n1)..char(n2)... */

Source from the content-addressed store, hash-verified

136** utfchar(n1, n2, ...) -> char(n1)..char(n2)...
137*/
138static int utfchar (lua_State *L) {
139 int n = lua_gettop(L); /* number of arguments */
140 if (n == 1) /* optimize common case of single char */
141 pushutfchar(L, 1);
142 else {
143 int i;
144 luaL_Buffer b;
145 luaL_buffinit(L, &b);
146 for (i = 1; i <= n; i++) {
147 pushutfchar(L, i);
148 luaL_addvalue(&b);
149 }
150 luaL_pushresult(&b);
151 }
152 return 1;
153}
154
155
156/*

Callers

nothing calls this directly

Calls 5

lua_gettopFunction · 0.70
pushutfcharFunction · 0.70
luaL_buffinitFunction · 0.70
luaL_addvalueFunction · 0.70
luaL_pushresultFunction · 0.70

Tested by

no test coverage detected