MCPcopy
hub / github.com/pocketbase/pocketbase / trimLeftSpaces

Function trimLeftSpaces

core/db_builder.go:165–178  ·  view source on GitHub ↗

note: similar to strings.Space() but without the right trim because it is not needed in our case

(str string)

Source from the content-addressed store, hash-verified

163
164// note: similar to strings.Space() but without the right trim because it is not needed in our case
165func trimLeftSpaces(str string) string {
166 start := 0
167 for ; start < len(str); start++ {
168 c := str[start]
169 if c >= utf8.RuneSelf {
170 return strings.TrimLeftFunc(str[start:], unicode.IsSpace)
171 }
172 if asciiSpace[c] == 0 {
173 break
174 }
175 }
176
177 return str[start:]
178}
179
180// note: the prefix is expected to be ASCII
181func hasPrefixFold(str, prefix string) bool {

Callers 1

NewQueryMethod · 0.85

Calls

no outgoing calls

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…