Lines Matching refs:l
29 size_t l; in str_len() local
30 luaL_checklstring(L, 1, &l); in str_len()
31 lua_pushinteger(L, l); in str_len()
44 size_t l; in str_sub() local
45 const char *s = luaL_checklstring(L, 1, &l); in str_sub()
46 ptrdiff_t start = posrelat(luaL_checkinteger(L, 2), l); in str_sub()
47 ptrdiff_t end = posrelat(luaL_optinteger(L, 3, -1), l); in str_sub()
49 if (end > (ptrdiff_t)l) end = (ptrdiff_t)l; in str_sub()
58 size_t l; in str_reverse() local
60 const char *s = luaL_checklstring(L, 1, &l); in str_reverse()
62 while (l--) luaL_addchar(&b, s[l]); in str_reverse()
69 size_t l; in str_lower() local
72 const char *s = luaL_checklstring(L, 1, &l); in str_lower()
74 for (i=0; i<l; i++) in str_lower()
82 size_t l; in str_upper() local
85 const char *s = luaL_checklstring(L, 1, &l); in str_upper()
87 for (i=0; i<l; i++) in str_upper()
94 size_t l; in str_rep() local
96 const char *s = luaL_checklstring(L, 1, &l); in str_rep()
100 luaL_addlstring(&b, s, l); in str_rep()
107 size_t l; in str_byte() local
108 const char *s = luaL_checklstring(L, 1, &l); in str_byte()
109 ptrdiff_t posi = posrelat(luaL_optinteger(L, 2, 1), l); in str_byte()
110 ptrdiff_t pose = posrelat(luaL_optinteger(L, 3, posi), l); in str_byte()
113 if ((size_t)pose > l) pose = l; in str_byte()
186 static int check_capture (MatchState *ms, int l) { in check_capture() argument
187 l -= '1'; in check_capture()
188 if (l < 0 || l >= ms->level || ms->capture[l].len == CAP_UNFINISHED) in check_capture()
190 return l; in check_capture()
345 int l = capture_to_close(ms); in end_capture() local
347 ms->capture[l].len = s - ms->capture[l].init; /* close capture */ in end_capture()
349 ms->capture[l].len = CAP_UNFINISHED; /* undo capture */ in end_capture()
354 static const char *match_capture (MatchState *ms, const char *s, int l) { in match_capture() argument
356 l = check_capture(ms, l); in match_capture()
357 len = ms->capture[l].len; in match_capture()
359 memcmp(ms->capture[l].init, s, len) == 0) in match_capture()
475 ptrdiff_t l = ms->capture[i].len; in push_onecapture() local
476 if (l == CAP_UNFINISHED) luaL_error(ms->L, "unfinished capture"); in push_onecapture()
477 if (l == CAP_POSITION) in push_onecapture()
480 lua_pushlstring(ms->L, ms->capture[i].init, l); in push_onecapture()
592 size_t l, i; in add_s() local
593 const char *news = lua_tolstring(ms->L, 3, &l); in add_s()
594 for (i = 0; i < l; i++) { in add_s()
697 size_t l; in addquoted() local
698 const char *s = luaL_checklstring(L, arg, &l); in addquoted()
700 while (l--) { in addquoted()
748 size_t l = strlen(form); in addintlen() local
749 char spec = form[l - 1]; in addintlen()
750 strcpy(form + l - 1, LUA_INTFRMLEN); in addintlen()
751 form[l + sizeof(LUA_INTFRMLEN) - 2] = spec; in addintlen()
752 form[l + sizeof(LUA_INTFRMLEN) - 1] = '\0'; in addintlen()
800 size_t l; in str_format() local
801 const char *s = luaL_checklstring(L, arg, &l); in str_format()
802 if (!strchr(form, '.') && l >= 100) { in str_format()