multibyte strtr() -> mb_strtr()

请求翻译

Does anyone have written multibyte variant of function strtr() ? I need this one.

Edit 1 (example of desired usage):

Example:
$from = '??????yáí??ň??'; // these chars are in UTF-8
$to   = 'llsctzyai?dnao';

// input - in UTF-8
$str  = 'K?de? ?at?ov u?í koňa ?ra? k?ru.';
$str  = mb_strtr( $str, $from, $to );

// output - str without diacritic
// $str = 'Krdel datlov uci kona zrat koru.';

3个回答