Skip to content

Commit

Permalink
minor #17896 Changing "white spaces" => "whitespace" (ThomasLandauer)
Browse files Browse the repository at this point in the history
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"
  • Loading branch information
javiereguiluz committed Feb 17, 2023
2 parents 5f12abb + 369b563 commit 6f324aa
Showing 1 changed file with 6 additions and 6 deletions.
12 changes: 6 additions & 6 deletions components/string.rst
Original file line number Diff line number Diff line change
Expand Up @@ -177,8 +177,8 @@ There is also a method to get the bytes stored at some position::
b('नमस्ते')->bytesAt(1); // [164]
u('नमस्ते')->bytesAt(1); // [224, 164, 174]

Methods Related to Length and White Spaces
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~
Methods Related to Length and Whitespace Characters
~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~~

::

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

// only returns TRUE if the string is exactly an empty string (not even white spaces)
// only returns TRUE if the string is exactly an empty string (not even whitespace)
u('hello world')->isEmpty(); // false
u(' ')->isEmpty(); // false
u('')->isEmpty(); // true

// removes all white spaces from the start and end of the string and replaces two
// or more consecutive white spaces inside contents by a single white space
// removes all whitespace from the start and end of the string and replaces two
// or more consecutive whitespace characters inside contents by a single white space
u(" \n\n hello world \n \n")->collapseWhitespace(); // 'hello world'

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

// removes the given characters (by default, white spaces) from the string
// removes the given characters (default: whitespace characters) from the beginning and end of a string
u(' Lorem Ipsum ')->trim(); // 'Lorem Ipsum'
u('Lorem Ipsum ')->trim('m'); // 'Lorem Ipsum '
u('Lorem Ipsum')->trim('m'); // 'Lorem Ipsu'
Expand Down

0 comments on commit 6f324aa

Please sign in to comment.