La clase TXT agrupa herramientas para trabajar sobre texto al estilo navaja suiza.
$txt = TXT::create( "Lorem ipsum..." );
$txt->startWith('Lorem '); //TRUE
TXT::create( "Lorem ipsum..." )->endWith('...'); //TRUE
$text = $otherText = 'Lorem ipsum...';
TXT::create($text)->equals($otherText); //TRUE
Comparación de string segura a nivel binario. Devuelve < 0 si $ext es menor que $therText; > 0 si $text es mayor que $otherText y 0 si son iguales. @see https://www.php.net/manual/es/function.strcmp.php
$text = $otherText = 'Lorem ipsum...';
TXT::create($text)->compare($otherText) === 0; //TRUE
TXT::create('Lorem ipsum...')->contains('rem ip'); //TRUE
TXT::create('Lorem|ipsum')->lastPart('|'); //ipsum
TXT::create('Lorem|ipsum')->lastPart('|', TRUE); //|ipsum
TXT::create('Lorem|ipsum')->firstPart('|'); //Lorem
TXT::create('Lorem|ipsum')->firstPart('|', TRUE); //Lorem|
TXT::create('mAke_mE camel-case pLEase')->toCamelCaseClass() == 'MakeMeCamelCasePlease'; //TRUE
TXT::create('MAke_mE camel-case pLEase')->toCamelCaseVariable() == 'makeMeCamelCasePlease'; //TRUE