Strings improvement: trim ZWSP char by CrazyMuffin · Pull Request #304 · nette/utils

Skip to content

Navigation Menu

Sign in

Appearance settings

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

Conversation

@CrazyMuffin

Copy link

Contributor

  • new feature
  • BC break? yes - if someone relies on having ZWSP non-trimmed while using default parameter.
  • doc PR: Not needed, function is covered and does not mention the default characters

Sneaky Zero-Width Space char \u{200B} is currently untrimmed by trim function, while I'd expect it to do so.

Workaround:

  1. Fork or extend the class and overwrite default param
  2. Manually set updated charlist as second argument to every trim() call
JanTvrdik and mzk reacted with thumbs up emoji

@dg

Copy link

Member

dg commented

Oct 30, 2023

Thanks

@dg dg merged commit 4b7b01e into nette:master

Oct 30, 2023

dg pushed a commit that referenced this pull request

Nov 1, 2023

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

Reviewers

No reviews

Assignees

No one assigned

Labels

None yet

Projects

None yet

Milestone

No milestone

Development

Successfully merging this pull request may close these issues.

2 participants

@CrazyMuffin @dg