Stringy - a simple way of string manipulation

Code
<?php

use function Stringy\create as s;

dump(

(string) 
s('too     much     space...')
    ->
replace('too''not')
    ->
collapseWhitespace(),

(string) 
s('shout ')
    ->
repeat(2)
    ->
toUpperCase()
    ->
append('let it all out'),

s('òçå')->getEncoding()

);

foreach(
s('text') as $char) {
    echo 
$char PHP_EOL;
}


$text 'öńšç';
dump(strlen($text), s($text)->length());
Result
^ "not much space..."

^ "SHOUT SHOUT let it all out"

^ "UTF-8"

t
e
x
t
^ 8

^ 4
Used Versions
PHP 8.2, Laminas MVC 3.2, Symfony 5.2, Laravel 8.28, PHPUnit 9.5, Doctrine ORM 2.8