Skip to content

[String] Add the reverse() method #35091

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

Merged
merged 1 commit into from
Dec 26, 2019

Conversation

fancyweb
Copy link
Contributor

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

Allows to easily reverse a string since mb_strrev does not exist.

Copy link
Member

@nicolas-grekas nicolas-grekas left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

(with a minor comment)

@nicolas-grekas nicolas-grekas changed the title [String] Add the reverse method [String] Add the reverse() method Dec 26, 2019
@nicolas-grekas
Copy link
Member

Thank you @fancyweb.

nicolas-grekas added a commit that referenced this pull request Dec 26, 2019
This PR was merged into the 5.1-dev branch.

Discussion
----------

[String] Add the reverse() method

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

Allows to easily reverse a string since `mb_strrev` does not exist.

Commits
-------

c369598 [String] Add the reverse method
@nicolas-grekas nicolas-grekas merged commit c369598 into symfony:master Dec 26, 2019
@nicolas-grekas nicolas-grekas modified the milestones: next, 5.1 May 4, 2020
fabpot added a commit that referenced this pull request May 5, 2020
This PR was merged into the 5.1-dev branch.

Discussion
----------

[Inflector][String] Move Inflector in String

| Q             | A
| ------------- | ---
| Branch?       | master
| Bug fix?      | no
| New feature?  | yes
| Deprecations? | yes
| Tickets       | https://github.com/orgs/symfony/projects/1#card-30499514
| License       | MIT
| Doc PR        | -

Needs #35091.

Should we have a standalone inflector (like the Slugger) or 2 new methods (pluralize and singularize) on the AbstractString class? I implemented both but since we only handle English I finally preferred the first one.

TODO (after the "move" is OK):
- [x] Deprecate the Inflector component
- [x] Use the String inflector in Symfony's code

Commits
-------

9c6a5c0 [String] Move Inflector in String
@fabpot fabpot mentioned this pull request May 5, 2020
@fancyweb fancyweb deleted the string-reverse branch April 16, 2021 13:36
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.

4 participants