(s string, cutset string)
| 242 | } |
| 243 | |
| 244 | func cutAny(s string, cutset string) (before, after string, found bool) { |
| 245 | if i := strings.IndexAny(s, cutset); i >= 0 { |
| 246 | before = s[:i] |
| 247 | afterAndFound := s[i:] |
| 248 | _, size := utf8.DecodeRuneInString(afterAndFound) |
| 249 | after = afterAndFound[size:] |
| 250 | return before, after, true |
| 251 | } |
| 252 | return s, "", false |
| 253 | } |
| 254 | |
| 255 | func trimLeadingZeros(s string) string { |
| 256 | if strings.HasPrefix(s, "0") { |