Return part of the string.
Twine\Str::substring( int $start [, int $length = null ] ) : Twine\Str
$start | Starting position of the substring |
$length | Length of substring |
$string = new Twine\Str('john pinkerton');
$string->substring(5, 4); // Returns 'pink'
Twine\Str::first($count)
|
= |
Twine\Str::substring(0, $count)
|
Twine\Str::last($count)
|
= |
Twine\Str::substring(-$count)
|