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

Function utfchar

third-party/lua-5.5.0/src/lutf8lib.c:156–171  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

154** utfchar(n1, n2, ...) -> char(n1)..char(n2)...
155*/
156static int utfchar (lua_State *L) {
157 int n = lua_gettop(L); /* number of arguments */
158 if (n == 1) /* optimize common case of single char */
159 pushutfchar(L, 1);
160 else {
161 int i;
162 luaL_Buffer b;
163 luaL_buffinit(L, &b);
164 for (i = 1; i <= n; i++) {
165 pushutfchar(L, i);
166 luaL_addvalue(&b);
167 }
168 luaL_pushresult(&b);
169 }
170 return 1;
171}
172
173
174/*

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