@@ -177,8 +177,8 @@ There is also a method to get the bytes stored at some position::
177
177
b('नमस्ते')->bytesAt(1); // [164]
178
178
u('नमस्ते')->bytesAt(1); // [224, 164, 174]
179
179
180
- Methods Related to Length and White Spaces
181
- ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180
+ Methods Related to Length and Whitespace Characters
181
+ ~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182
182
183
183
::
184
184
@@ -202,13 +202,13 @@ Methods Related to Length and White Spaces
202
202
END";
203
203
u($text)->width(); // 14
204
204
205
- // only returns TRUE if the string is exactly an empty string (not even white spaces )
205
+ // only returns TRUE if the string is exactly an empty string (not even whitespace )
206
206
u('hello world')->isEmpty(); // false
207
207
u(' ')->isEmpty(); // false
208
208
u('')->isEmpty(); // true
209
209
210
- // removes all white spaces from the start and end of the string and replaces two
211
- // or more consecutive white spaces inside contents by a single white space
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
212
u(" \n\n hello world \n \n")->collapseWhitespace(); // 'hello world'
213
213
214
214
Methods to Change Case
@@ -298,7 +298,7 @@ Methods to Pad and Trim
298
298
// repeats the given string the number of times passed as argument
299
299
u('_.')->repeat(10); // '_._._._._._._._._._.'
300
300
301
- // removes the given characters (by default, white spaces ) from the string
301
+ // removes the given characters (default: whitespace characters ) from the beginning and end of a string
302
302
u(' Lorem Ipsum ')->trim(); // 'Lorem Ipsum'
303
303
u('Lorem Ipsum ')->trim('m'); // 'Lorem Ipsum '
304
304
u('Lorem Ipsum')->trim('m'); // 'Lorem Ipsu'
0 commit comments