Return part of the string up to and including the first occurance of another string.

Twine\Str::to( string $string ) : Twine\Str

Parameters

$string The string to end with

Examples

$string = new Twine\Str('john pinkerton');

        $string->to('pink'); // Returns 'john pink'
$string = new Twine\Str('john pinkerton');

        $string->to('purple'); // Returns ''