note: similar to strings.Space() but without the right trim because it is not needed in our case
(str string)
| 163 | |
| 164 | // note: similar to strings.Space() but without the right trim because it is not needed in our case |
| 165 | func 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 |
| 181 | func hasPrefixFold(str, prefix string) bool { |
no outgoing calls
no test coverage detected
searching dependent graphs…