Skip to content

Conversation

nicolas-grekas
Copy link
Member

Q A
Branch? 5.4
Bug fix? no
New feature? yes
Deprecations? no
Tickets -
License MIT
Doc PR -

Inspired by golang's string API.

@carsonbot
Copy link

Hey!

I think @fancyweb has recently worked with this code. Maybe they can help review this?

Cheers!

Carsonbot

@fabpot
Copy link
Member

fabpot commented Oct 15, 2021

Thank you @nicolas-grekas.

@javiereguiluz
Copy link
Member

But aren't these very similar (the same?) as the existing methods after() and beforeLast() ?

@nicolas-grekas
Copy link
Member Author

nicolas-grekas commented Oct 15, 2021

They're not the same: the needle passed to after/before can be found anywhere in the string, not only at the start/end.

@javiereguiluz
Copy link
Member

Ah, that's indeed different. Thanks for the info!

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

Successfully merging this pull request may close these issues.

5 participants