File tree Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Expand file tree Collapse file tree 1 file changed +5
-3
lines changed Original file line number Diff line number Diff line change @@ -177,6 +177,8 @@ There is also a method to get the bytes stored at some position::
177177 b('नमस्ते')->bytesAt(1); // [164]
178178 u('नमस्ते')->bytesAt(1); // [224, 164, 174]
179179
180+ .. _methods-related-to-length-and-white-spaces :
181+
180182Methods Related to Length and Whitespace Characters
181183~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182184
@@ -207,9 +209,9 @@ Methods Related to Length and Whitespace Characters
207209 u(' ')->isEmpty(); // false
208210 u('')->isEmpty(); // true
209211
210- // removes all whitespace from the start and end of the string and replaces two
211- // or more consecutive whitespace characters inside contents by a single white space
212- u(" \n\n hello world \n \n")->collapseWhitespace(); // 'hello world'
212+ // removes all whitespace (' \n\r\t\x0C') from the start and end of the string and
213+ // replaces two or more consecutive whitespace characters with a single space (' ') character
214+ u(" \n\n hello \t \n\r world \n \n")->collapseWhitespace(); // 'hello world'
213215
214216Methods to Change Case
215217~~~~~~~~~~~~~~~~~~~~~~
You can’t perform that action at this time.
0 commit comments