Split the string into an array containing a specific number of chunks.

Twine\Str::split( int $chunks ) : array

Parameters

$chunks The number of chunks

Examples

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

        $string->split(2); // Returns ['john pi ', 'nkerton']
        $string->split(3); // Returns ['john ', 'pinke', 'rton']