MCPcopy Create free account
hub / github.com/BigPig0/RelayLive / utfchar

Function utfchar

ThirdParty/lua/lua/lutf8lib.c:137–152  ·  view source on GitHub ↗

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

Source from the content-addressed store, hash-verified

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

Callers

nothing calls this directly

Calls 5

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

Tested by

no test coverage detected