Indexing & Counting
Find positions, count occurrences
| Function | What it does |
|---|---|
strings.Count | Count non-overlapping occurrences of substring |
strings.Index | First index of substring (-1 if not found) |
strings.IndexAny | First index of any character from chars |
strings.IndexByte | First index of byte |
strings.IndexRune | First index of rune |
strings.LastIndex | Last index of substring |
strings.LastIndexAny | Last index of any character from chars |
strings.LastIndexByte | Last index of byte |