MCPcopy Index your code
hub / github.com/Shopify/go-lua / relativePosition

Function relativePosition

string.go:11–18  ·  view source on GitHub ↗
(pos, length int)

Source from the content-addressed store, hash-verified

9)
10
11func relativePosition(pos, length int) int {
12 if pos >= 0 {
13 return pos
14 } else if -pos > length {
15 return 0
16 }
17 return length + pos + 1
18}
19
20func findHelper(l *State, isFind bool) int {
21 s, p := CheckString(l, 1), CheckString(l, 2)

Callers 2

findHelperFunction · 0.85
string.goFile · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected