private static function convert($string, $from, $to) {

        if(true === function_exists('iconv')) {
            $result = iconv($from, $to, $string);
        } 
        elseif(true === function_exists('mb_convert_encoding')) {
            $result = mb_convert_encoding($string, $to, $from);
        }
        else {
			return trigger_error(sprintf('%s requires either the iconv or mbstring extension to be installed', __METHOD__), E_USER_ERROR);
        }

        if($result === false) {
            return '';
        }

        return $result;
    }