MCPcopy Create free account
hub / github.com/RomanKubiak/ctrlr / posrelat

Function posrelat

Source/Misc/lua/src/lua.c:13713–13717  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

13711
13712
13713static ptrdiff_t posrelat (ptrdiff_t pos, size_t len) {
13714/* relative string position: negative means back from end */
13715if (pos < 0) pos += (ptrdiff_t)len + 1;
13716return (pos >= 0) ? pos : 0;
13717}
13718
13719
13720static int str_sub (lua_State *L) {

Callers 3

str_subFunction · 0.85
str_byteFunction · 0.85
str_find_auxFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected