Return part of the string up to and including the first occurance of another string.
Twine\Str::to( string $string ) : Twine\Str
$string | The string to end with |
$string = new Twine\Str('john pinkerton');
$string->to('pink'); // Returns 'john pink'
$string = new Twine\Str('john pinkerton');
$string->to('purple'); // Returns ''