On Tuesday, February 21, 2017 at 1:12:37 AM UTC+8, T L wrote: > > I know gc assures this, but I don't know if it is compiler specified or a > spec rule. > > It looks that the function "Index(s, sep string) int" in strings package > has not a fromIndex parameter. > So I must use strings.Index(s[fromIndex:], sep) to search a substr from a > specified index. > This implies the cost of the operation s[fromIndex:] would be small. > > But I can't Go spec make the guarantee that a substring shares the > underlying bytes with the original string. > sorry, lost a "find" after "can't".
> Or I missed it? > > -- You received this message because you are subscribed to the Google Groups "golang-nuts" group. To unsubscribe from this group and stop receiving emails from it, send an email to [email protected]. For more options, visit https://groups.google.com/d/optout.
