Skip to content

Add TrimFormatter for configurable string edge trimming#15

Open
henriquemoody wants to merge 1 commit intoRespect:mainfrom
henriquemoody:trim_formatter
Open

Add TrimFormatter for configurable string edge trimming#15
henriquemoody wants to merge 1 commit intoRespect:mainfrom
henriquemoody:trim_formatter

Conversation

@henriquemoody
Copy link
Member

@henriquemoody henriquemoody commented Feb 6, 2026

Allows precise control over trimming operations with support for left, right, or both sides and custom characters, using PHP's mb_trim, mb_ltrim, and mb_rtrim functions for proper multibyte-safe trimming.

Includes comprehensive tests covering all trim modes, custom characters, Unicode characters (CJK, emoji), special characters, multi-byte strings, and edge cases like empty strings and strings shorter than the characters to trim.

Assisted-by: OpenCode (GLM-4.7)

@codecov-commenter
Copy link

codecov-commenter commented Feb 6, 2026

Codecov Report

✅ All modified and coverable lines are covered by tests.
✅ Project coverage is 99.54%. Comparing base (4c3bfd0) to head (113499a).

Additional details and impacted files
@@             Coverage Diff              @@
##               main      #15      +/-   ##
============================================
+ Coverage     99.53%   99.54%   +0.01%     
- Complexity      193      199       +6     
============================================
  Files            28       29       +1     
  Lines           434      444      +10     
============================================
+ Hits            432      442      +10     
  Misses            2        2              

☔ View full report in Codecov by Sentry.
📢 Have feedback on the report? Share it here.

🚀 New features to boost your workflow:
  • ❄️ Test Analytics: Detect flaky tests, report on failures, and find test suite problems.

@henriquemoody henriquemoody force-pushed the trim_formatter branch 4 times, most recently from c905f41 to 4d383f4 Compare February 6, 2026 21:19
@henriquemoody henriquemoody requested a review from alganet February 6, 2026 21:21
@henriquemoody henriquemoody force-pushed the trim_formatter branch 3 times, most recently from 65f8e47 to 9604536 Compare February 7, 2026 08:43
@henriquemoody henriquemoody requested a review from alganet February 7, 2026 08:49
@henriquemoody henriquemoody requested review from alganet and removed request for alganet February 8, 2026 23:05
@henriquemoody henriquemoody force-pushed the trim_formatter branch 2 times, most recently from 8ef2030 to e0d410a Compare February 9, 2026 12:05
Allows precise control over trimming operations with support for left,
right, or both sides and custom characters, using PHP's mb_trim,
mb_ltrim, and mb_rtrim functions for proper multibyte-safe trimming.

Includes comprehensive tests covering all trim modes, custom characters,
Unicode characters (CJK, emoji), special characters, multi-byte
strings, and edge cases like empty strings and strings shorter than
the characters to trim.

Assisted-by: OpenCode (GLM-4.7)
@henriquemoody henriquemoody requested review from alganet and removed request for alganet February 9, 2026 12:57
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.

3 participants