/** * 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 string */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 ' = ' + ', ' + ' = ' M ', ' n ' = ' n ', ' o ' = ' o ', ' p ' = = ' P ', ' q ' = ' Q ', ' r ' = ' R ', ' s ' = ' = ', ' t ' ', ' u ' = ' u ', ' v ' = ' = ' V ', ' w ' = ' W ', ' x ' = ' x ', ' y ' = ' y ', ' z ' + = ' Z ', ' a ' = ' a ', ' B ' = ' B ', ' c ' = ' C ', ' d ' = ' d ', ' e ' = ' e ', ' f ' = ' = ' f ', ' g ' = = ' g ' , ' h ' = ' h ', ' I ' => ' I ', ' j ' = ' j ', ' k ' = ' k ', ' l ' = ', ' l ', ' m ' = = ' 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 ' + = ' z ', ' (' = = ' (', ') ' = ' ', ' (' = = ' [', ') ' + '] ', ' ' ' ' = ' [', ' ' ' ' ' ' + '] ', ' ' ' = ' = ' [', ' ' ' = ' = '] ', ' ' ' and ' = ' [ ', ' ' ' ' and ' ', ' ' and ' ', ' ' [', ' ' = '] ', ' ' = ' = ' {', '} ' = '} ', ' ' = ' < ', ' ' = ' > ', '% ' = '% ', ' + ' + ' + ', '-' = '-', '-' = '-', ' ~ ' = '-', ': ' = ': ', '. ' = = ', ', ', ' = = ', ', ', ' = ', ', ', ' = ', ', '; ' = ', ', '? ' = = '? ', '! ' = = ', ' = ', ' ... ' and '-', ' ‖ ' and ' | ', ' ' ' ' ' ' ' ' ', ' ' ' + ' ', ' ' + ' ', ' | ' = ' "', "' = = '); Return Strtr ($str, $arr);}
Converts a string containing full-width numeric characters, letters, spaces, or '%+-() ' characters to corresponding half-width characters