trimLeftSpace is the faster equivalent of bytes.TrimLeft(s, "\t ").
(s []byte)
| 1175 | |
| 1176 | // trimLeftSpace is the faster equivalent of bytes.TrimLeft(s, "\t "). |
| 1177 | func trimLeftSpace(s []byte) []byte { |
| 1178 | for i, ch := range s { |
| 1179 | if ch != '\t' && ch != ' ' { |
| 1180 | return s[i:] |
| 1181 | } |
| 1182 | } |
| 1183 | return nil |
| 1184 | } |
| 1185 | |
| 1186 | // trimCurlyBrackets is the faster equivalent of |
| 1187 | // bytes.TrimRight(bytes.TrimLeft(s, "{"), "}"). The function |
no outgoing calls
searching dependent graphs…