词条 | ctype_upper |
释义 | ctype_upper(PHP 4 >= 4.0.4, PHP 5) ctype_upper -- 检查大写字符 函数原型bool ctype_upper ( string text ) 检查大写字符 范例<?php $strings = array('AKLWC139', 'LMNSDO', 'akwSKWsm'); foreach ($strings as $testcase) { if (ctype_upper($testcase)) { echo "The string $testcase consists of all uppercase letters.\"; } else { echo "The string $testcase does not consist of all uppercase letters.\"; } } ?> 上例将输出:The string AKLWC139 does not consist of all uppercase letters. The string LMNSDO consists of all uppercase letters. The string akwSKWsm does not consist of all uppercase letters. |
随便看 |
百科全书收录4421916条中文百科知识,基本涵盖了大多数领域的百科知识,是一部内容开放、自由的电子版百科全书。