Skip to content

Define a constant to easily add more characters to trim together with UTF8-spaces and line breaks#3

Open
utilmind wants to merge 4 commits intoPHP-Polyfills:mainfrom
utilmind:main
Open

Define a constant to easily add more characters to trim together with UTF8-spaces and line breaks#3
utilmind wants to merge 4 commits intoPHP-Polyfills:mainfrom
utilmind:main

Conversation

@utilmind
Copy link
Copy Markdown

The UTF8_SPACES constant allows me to easily add more characters to trim from the string.

E.g.
echo mb_trim(' —888-888-00-00-', UTF8_SPACES.'-–—');
will trim both spaces and dashes from the phone numbers.

define UTF8_SPACES to be able to add more characters
@utilmind
Copy link
Copy Markdown
Author

This PR not related to issue I posted separately (at https://github.com/PHP-Polyfills/mb_trim/issues).
This is different, but consider fixing that issue too, either by specifying the type of return value or removing the type hints.

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

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

1 participant