-
Notifications
You must be signed in to change notification settings - Fork 18.8k
Closed
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAge
Milestone
Description
In the documentation of the function Index, in package strings:
(referencing https://golang.org/pkg/strings/#Index as of 11 Feb 2017)
I find the use of the identifier "sep", in the description of func Index, to be confusing. On first reading I interpreted it to mean that Index would find the first occurrence in s of any of a set of "separator" characters. I suggest renaming "sep" to "substr", which would be consistent with strings.Contains.
A similar argument would apply to strings.Count and strings.LastIndex. However, the use of "sep" in strings.Join is clear as currently written.
The several Split... functions could possibly also be clarified by changing the first mention of "sep" in the prose of each to "the substring sep".
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
DocumentationIssues describing a change to documentation.Issues describing a change to documentation.FrozenDueToAge