From 27a4f11f2ee13fbe9ecb17e54c8ebf430e776625 Mon Sep 17 00:00:00 2001 From: Viktor Persson Date: Thu, 22 Dec 2016 10:37:27 +0100 Subject: [PATCH] Added documentation for stripWhitespace(). --- README.md | 11 +++++++++++ 1 file changed, 11 insertions(+) diff --git a/README.md b/README.md index e303d9b..172f7b4 100644 --- a/README.md +++ b/README.md @@ -79,6 +79,7 @@ s('string')->toTitleCase()->ensureRight('y') == 'Stringy' * [startsWith](#startswithstring-substring--boolean-casesensitive--true-) * [slice](#sliceint-start--int-end-) * [split](#splitstring-pattern--int-limit-) + * [stripWhitespace](#stripwhitespace) * [substr](#substrint-start--int-length-) * [surround](#surroundstring-substring) * [swapCase](#swapcase) @@ -794,6 +795,16 @@ results. s('foo,bar,baz')->split(',', 2); // ['foo', 'bar'] ``` +##### stripWhitespace() + +Strip all whitespace characters. This includes tabs and newline +characters, as well as multibyte whitespace such as the thin space +and ideographic space. + +```php +s(' Ο συγγραφέας ')->stripWhitespace(); // 'Οσυγγραφέας' +``` + ##### substr(int $start [, int $length ]) Returns the substring beginning at $start with the specified $length.