You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
- README: fix the run-on support sentence, backtick htmlspecialchars()
- date example: use a 2026 timestamp (example dates use the current
year), update the test to match
- method-reference: trim() shows its real signature, pregReplace() says
what throws and what returns null, add missing backticks here and in
ai-reference
- troubleshooting: decode example uses the same flags as the other pages
- ai-reference: new SmartString() works like new(); point phoneFormat()
users at pregReplace() like the changelog does
- cut the grep-audit sentence from the encoding intro (audit tips don't
belong on a learning page), reword three phrases into plain English
Copy file name to clipboardExpand all lines: docs/method-reference.md
+6-6Lines changed: 6 additions & 6 deletions
Display the source diff
Display the rich diff
Original file line number
Diff line number
Diff line change
@@ -71,10 +71,10 @@ ready for regular PHP code.
71
71
|`->prepend($value)`| Adds `$value` to the beginning of the current value |
72
72
|`->wrap($before, $after)`| Wraps the value; pass "" for a side you don't want |
73
73
|`->textOnly()`| Removes HTML tags, decodes entities, and trims whitespace |
74
-
|`->trim()`| Trims whitespace (or the characters you specify) from both ends|
74
+
|`->trim(...$args)`| Trims whitespace from both ends, or pass a character list like PHP `trim()`|
75
75
|`->maxWords($max, $ellipsis = '...')`| Limits the value to `$max` words; adds `$ellipsis` if text was cut off |
76
76
|`->maxChars($max, $ellipsis = '...')`| Limits the value to `$max` characters; adds `$ellipsis` if text was cut off |
77
-
|`->pregReplace($pattern, $replacement)`| Replaces text matching a regex pattern |
77
+
|`->pregReplace($pattern, $replacement)`| Replaces text matching a regex; an invalid `$pattern` throws `InvalidArgumentException`, a value it can't process (bad UTF-8) returns null|
0 commit comments