Skip to content

strings: IndexAfter function. #5844

Description

@mewmew
When using strings.Index it's quite often that I want the position directly after what
the match. The same is true in the standard library, see the link below:

http://play.golang.org/p/tvk90G34vY

Does a function like IndexAfter belong in the standard library? See the example below:

http://play.golang.org/p/s8s7qEUWw5

Probably not, but I still wanna hear your thoughts.

Which compiler are you using (5g, 6g, 8g, gccgo)?
6g

Which operating system are you using?
Arch Linux

Which version are you using?  (run 'go version')
go version devel +cf792c00f410 Fri Jul 05 16:11:22 2013 +0200 linux/amd64

Please provide any additional information below.
I was told by Andrew to create an issue so it can be further discussed once Go 1.1 was
out.

Ref:
https://groups.google.com/forum/?_escaped_fragment_=topic/golang-dev/zounyeqoKgk#!topic/golang-dev/zounyeqoKgk

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions