Skip to content

Commit

Permalink
fix: explode with empty separator in exemplar (#587)
Browse files Browse the repository at this point in the history
Explode with empty separator errs: https://3v4l.org/RevTj
Use mb_str_split instead: https://3v4l.org/VAKbR
  • Loading branch information
vnkmpf authored Nov 28, 2023
1 parent 19705a7 commit 44ea217
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 2 deletions.
2 changes: 1 addition & 1 deletion exercises/concept/city-office/.meta/exemplar/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function blanks(int $length): string

function letters(string $word): array
{
return explode("", $word);
return mb_str_split($word);
}

function checkLength(string $word, int $max_length): bool
Expand Down
2 changes: 1 addition & 1 deletion exercises/concept/city-office/Form.php
Original file line number Diff line number Diff line change
Expand Up @@ -9,7 +9,7 @@ function blanks($length)

function letters($word)
{
return explode("", $word);
return mb_str_split($word);
}

function checkLength($word, $max_length)
Expand Down

0 comments on commit 44ea217

Please sign in to comment.