Stable
This commit is contained in:
@@ -1,10 +1,10 @@
|
||||
<?php
|
||||
namespace utils;
|
||||
function simpify_string(string $string): string
|
||||
{
|
||||
$string = mb_strtolower($string);
|
||||
|
||||
$string_without_accents = str_replace(array('á', 'é', 'í', 'ó', 'ú', 'ñ'), array('a', 'e', 'i', 'o', 'u', 'n'), $string);
|
||||
$string_without_spaces = str_replace(' ', '', $string_without_accents);
|
||||
return $string_without_spaces;
|
||||
}
|
||||
<?php
|
||||
namespace utils;
|
||||
function simpify_string(string $string): string
|
||||
{
|
||||
$string = mb_strtolower($string);
|
||||
|
||||
$string_without_accents = str_replace(array('á', 'é', 'í', 'ó', 'ú', 'ñ'), array('a', 'e', 'i', 'o', 'u', 'n'), $string);
|
||||
$string_without_spaces = str_replace(' ', '', $string_without_accents);
|
||||
return $string_without_spaces;
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user