MCPcopy Create free account
hub / github.com/Overload-Technologies/Overload / utfchar

Function utfchar

Dependencies/lua/src/lutf8lib.c:165–180  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

163** utfchar(n1, n2, ...) -> char(n1)..char(n2)...
164*/
165static int utfchar (lua_State *L) {
166 int n = lua_gettop(L); /* number of arguments */
167 if (n == 1) /* optimize common case of single char */
168 pushutfchar(L, 1);
169 else {
170 int i;
171 luaL_Buffer b;
172 luaL_buffinit(L, &b);
173 for (i = 1; i <= n; i++) {
174 pushutfchar(L, i);
175 luaL_addvalue(&b);
176 }
177 luaL_pushresult(&b);
178 }
179 return 1;
180}
181
182
183/*

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected