MCPcopy Create free account
hub / github.com/devfeel/dottask / subString

Function subString

express.go:191–204  ·  view source on GitHub ↗
(str string, begin, end int)

Source from the content-addressed store, hash-verified

189}
190
191func subString(str string, begin, end int) string {
192 rs := []rune(str)
193 length := len(rs)
194 if begin < 0 {
195 begin = 0
196 }
197 if begin >= length {
198 return ""
199 }
200 if end == -1 || end > length {
201 return string(rs[begin:])
202 }
203 return string(rs[begin:end])
204}

Callers 1

parseExpressFunction · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected