Skip to content

Changing "white spaces" => "whitespace" #17896

New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Merged
merged 1 commit into from
Feb 17, 2023
Merged
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
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