Get every nth character of the string.

Twine\Str::nth( int $step [ , int $offset = 0 ] ) : Twine\Str

Parameters

$step The number of characters to step
$offset The string offset to start at

Examples

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

        $string->nth(3); // Returns 'jnieo'
        $string->nth(3, 2); // Returns 'hpkt'