Skip to content

Commit 6f324aa

Browse files
committed
minor #17896 Changing "white spaces" => "whitespace" (ThomasLandauer)
This PR was squashed before being merged into the 5.4 branch. Discussion ---------- Changing "white spaces" => "whitespace" According to twigphp/Twig#3806 (comment) - but I didn't doublecheck. Commits ------- 369b563 Changing "white spaces" => "whitespace"
2 parents 5f12abb + 369b563 commit 6f324aa

File tree

1 file changed

+6
-6
lines changed

1 file changed

+6
-6
lines changed

components/string.rst

Lines changed: 6 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -177,8 +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-
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
180+
Methods Related to Length and Whitespace Characters
181+
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
182182

183183
::
184184

@@ -202,13 +202,13 @@ Methods Related to Length and White Spaces
202202
END";
203203
u($text)->width(); // 14
204204

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)
206206
u('hello world')->isEmpty(); // false
207207
u(' ')->isEmpty(); // false
208208
u('')->isEmpty(); // true
209209

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
212212
u(" \n\n hello world \n \n")->collapseWhitespace(); // 'hello world'
213213

214214
Methods to Change Case
@@ -298,7 +298,7 @@ Methods to Pad and Trim
298298
// repeats the given string the number of times passed as argument
299299
u('_.')->repeat(10); // '_._._._._._._._._._.'
300300

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
302302
u(' Lorem Ipsum ')->trim(); // 'Lorem Ipsum'
303303
u('Lorem Ipsum ')->trim('m'); // 'Lorem Ipsum '
304304
u('Lorem Ipsum')->trim('m'); // 'Lorem Ipsu'

0 commit comments

Comments
 (0)