protected prepareChoonpuTransliteration ( string $str ) : string | ||
$str | string | String to be prepared. |
Результат | string | Prepared string. |
protected function prepareChoonpuTransliteration($str)
{
// Consonant followed by two of the same vowel
$consonant = 'bcdfghjklmnpqrstvwyz';
return preg_replace_callback('/(^[' . $consonant . '])(aa|ii|uu|ee|oo)/u', function ($matches) {
return $matches[1] . substr($matches[2], 1) . 'ー';
}, $str);
}