Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

strings: IndexAfter function. #5844

Closed
mewmew opened this issue Jul 7, 2013 · 1 comment
Closed

strings: IndexAfter function. #5844

mewmew opened this issue Jul 7, 2013 · 1 comment

Comments

@mewmew
Copy link
Contributor

mewmew commented Jul 7, 2013

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
@rsc
Copy link
Contributor

rsc commented Jul 8, 2013

Comment 1:

Thanks but no thanks. It is too easy to write i+len(target) to be worth having a whole
new class of functions.

Status changed to WorkingAsIntended.

@golang golang locked and limited conversation to collaborators Jun 24, 2016
This issue was closed.
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Projects
None yet
Development

No branches or pull requests

3 participants