<table cellspacing="0" cellpadding="0"><tr><td class="t_f" id="postmessage_23843"> 基本操作 <br> <div class="blockcode"> <div id="code_fO1"><ol> <li><?php<li>/*<li> *<li> * @class Base_Char<li> * @author zhangys<li> * @date 2012/06/25<li> */<li><li>class Base_Var_Char<li>{<li> public static function isUpper ( $char )<li> {<li> $ascii = ord ( $char );<li> if( $ascii > 64 and $ascii < 91 ) return true;<li> return false;<li> }<li><li> public static function isLower ( $char )<li> {<li> $ascii = ord ( $char );<li> if( $ascii > 96 and $ascii < 123 ) return true;</li> <li> return false;</li> <li> }</li> <li> <li> public static function toUpper ( $char )</li> <li> {</li> <li> if ( self::isUpper ( $char ) ) return $char;</li> <li> $ascii = ord ( $char );</li> <li> return chr ( $ascii - 32 );</li> <li> }</li> <li> <li> public static function toLower ( $char )</li> <li> {</li> <li> if ( self::isLower ( $char ) ) return $char;</li> <li> $ascii = ord ( $char );</li> <li> return chr ( $ascii 32 );</li> <li> }</li> <li>}</li> </ol></div> <em onclick="copycode($('code_fO1'));">复制代码</em> </div> </td></tr></table> <div id="comment_23843" class="cm"> </div> <div id="post_rate_div_23843"></div> <br><br>