Ouzo\Translator::strtr_utf8 PHP Method

strtr_utf8() private method

private strtr_utf8 ( $text, $from, $to )
    private function strtr_utf8($text, $from, $to)
    {
        $keys = array();
        $values = array();
        preg_match_all('/./u', $from, $keys);
        preg_match_all('/./u', $to, $values);
        $mapping = array_combine($keys[0], $values[0]);
        return strtr($text, $mapping);
    }