Unlocking the power of Twine.
A Twine string can be manipulated fluently by chaining methods.
Perform a substring comparison.
$string = new Twine\Str('john pinkerton');
$string->substring(5, 4)->equals('pink'); // Returns true
Encode a file in compliance with RFC 2045.
$string = new Twine\Str(file_get_contents('garbage.bin'));
$string->base64()->wrap(76, "\r\n", Twine\Config\Wrap::HARD);