CakeFest 2025 Madrid: The Official CakePHP Conference

Voting

: min(seven, one)?
(Example: nine)

The Note You're Voting On

thflori at gmail
7 years ago
I agree that some people might want a mb_explode('', $string);

this is my solution for it:

<?php

$string
= 'Hallöle';

$array = array_map(function ($i) use ($string) {
return
mb_substr($string, $i, 1);
},
range(0, mb_strlen($string) -1));

expect($array)->toEqual(['H', 'a', 'l', 'l', 'ö', 'l', 'e']);

?>

<< Back to user notes page

To Top