Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

[String] AddtrimSuffix() andtrimPrefix() methods#43481

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 ourterms of service andprivacy statement. We’ll occasionally send you account related emails.

Already on GitHub?Sign in to your account

Merged
fabpot merged 1 commit intosymfony:5.4fromnicolas-grekas:s-trim
Oct 15, 2021

Conversation

@nicolas-grekas
Copy link
Member

QA
Branch?5.4
Bug fix?no
New feature?yes
Deprecations?no
Tickets-
LicenseMIT
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

Thank you@nicolas-grekas.

@javiereguiluz
Copy link
Member

But aren't these very similar (the same?) as the existing methodsafter() andbeforeLast() ?

@nicolas-grekas
Copy link
MemberAuthor

nicolas-grekas commentedOct 15, 2021
edited
Loading

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 and ging-dev reacted with thumbs up emoji

@javiereguiluz
Copy link
Member

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

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

Reviewers

@fabpotfabpotfabpot approved these changes

@OskarStarkOskarStarkOskarStark approved these changes

Assignees

No one assigned

Projects

None yet

Milestone

5.4

Development

Successfully merging this pull request may close these issues.

5 participants

@nicolas-grekas@carsonbot@fabpot@javiereguiluz@OskarStark

[8]ページ先頭

©2009-2025 Movatter.jp