David Symonds
unread,Dec 2, 2015, 5:07:42 PM12/2/15Sign in to reply to author
Sign in to forward
You do not have permission to delete messages in this group
Either email addresses are anonymous for this group or you need the view member email addresses permission to view the original message
to Ilya Kowalewski, golang-nuts
It doesn't seem like a particularly significant addition. Any use of
it would probably be better written as an explicit loop, calling Index
repeatedly, which would not require memory allocation (like your
suggestion would).
for i := strings.Index(s, sep); i >= 0; i += strings.Index(s[i:], sep) {
... // i is the next index
}