Copy CodeThe code is as follows:
/**
* Converts a string containing full-width numeric characters, letters, spaces, or '%+-() ' characters to corresponding half-width characters
* @access Public
* @param string $str the string to be converted
* @return string $STR processed strings
*/
function Make_semiangle ($STR)
{
$arr = Array (' 0 ' = ' 0 ', ' 1 ' = ' 1 ', ' 2 ' = ' 2 ', ' 3 ' = ' 3 ', ' 4 ' = ' 4 ', ' 5 ' = ' + ' 5 ', ' 6 ' = ' 6 ', ' 7 ' = > ' 7 ', ' 8 ' = ' 8 ', ' 9 ' = ' + ' 9 ', ' a ' = = ' A ', ' b ' = = ' B ', ' c ' = ' = ' c ', ' d ' and ' = ' d ', ' e ' = ' e ', ' F ' => ; ' F ', ' g ' = ' g ', ' h ' = = ' h ', ' i ' = ' I ', ' j ' = ' j ', ' k ' = ' k ', ' l ' = ' + ', '-' and ' = ', ' = ' = ' + ', ' n ' = ' n ' ', ' o ' and ' o ', ' p ' = = ' P ', ' q ' = = ' Q ', ' r ' = ' R ', ' s ' = ' = ', ' t ' = ' + ' t ', u ' = = ' u ', ' V ' = ' V ', ' W ' = = ' W ', ' x ' = ' x ', ' y ' = ' y ', ' z ' = ' = ', ' A ' and ' a ', ' a ' = ' a ', ' B ' = ' B ', ' c ' = ' C ', ' d ' = ' d ', ' E ' =& Gt ' E ', ' f ' = ' f ', ' g ' = = ' g ', ' h ' = = ' h ', ' i ' = ' I ', ' j ' = ' j ', ' k ' = ' k ', ' l ' = ' + ', ' m ' = ' , ' n ' = ' n ', ' o ' = ' o ', ' p ' = = ' P ', ' q ' + = ' q ', ' r ' + = ' r ', ' s ' = ' + ' s ', ' t ', ' + ' t ', ' u ' = ' u ', ' V ' = ' = ' V ', ' w ' = = ' W ', ' x ' + ' x ', ' y ' = ' y ', ' z ' = ' = ', ' ' (' = ' = ' (') ' = ' = ') ', ' (' = ' = ' [', ') ' = = '] ', ' "' => ' [', ' ' ' + '] ', ' ' ' = ' [', ' ' ' and ' ' = '] ', ' ' ' ' = ' ' [', ' ' ' ' ' ' = '] ', ' ' + ' [', ' ' + '] ', ' {' = ' = ', ' '} ' = ' = ', ' ' ' = ' < ', ' ' ' = ' > ', '% ' = '% ', ' + ' + ' + ', '-' = ' + '-', '-'-' + '-', ' ~ ' = '- ', ': ' = ': ', '. ' = = ', ', ', ' = = ', ', ', ' = ', ', ', ' = ', ', '; ' = ', ', '? ' = = '? ', '! ' = = '! ' = '-'-', ' ‖ ' and ' | ', ' ' ' ' ' ' ' ' ' ' ', ' ' ' + ' ', ' ' = ', ' ' ' ' ' ' ' > ");
Return Strtr ($str, $arr);
}
Copy CodeThe code is as follows:
$str = "0123abcdfws\",.? <> {}[]*&^%#@! ~ () +-|:; ";
echo "$str";
echo "
";
$str = Preg_replace ('/\xa3 ([\xa1-\xfe])/E ', ' Chr (Ord (\1) -0x80) ', $str);
Echo $str;
?>
http://www.bkjia.com/PHPjc/321930.html www.bkjia.com true http://www.bkjia.com/PHPjc/321930.html techarticle Copy the code as follows:/** * Converts a string containing full-width numeric characters, letters, spaces, or '%+-() ' characters to the corresponding half-width character * @access public * @param string $str to go ...