PHP中的ctype_lower()函数
ctype_lower()函数检查小写字符。如果文本中的每个字符在当前语言环境中均为小写字母,则返回TRUE。
语法
ctype_lower(str)
参数
str-测试的字符串
返回
如果文本中的每个字符在当前语言环境中均为小写字母,则ctype_lower()函数将返回TRUE。
示例
以下是一个例子-
<?php
$arr = array('Tim879', 'tom');
foreach ($arr as $x) {
if (ctype_lower($x)) {
echo "$x consists of all lowercase letters. \n";
}else {
echo "$x does not have all lowercase letters. \n";
}
}
?>输出结果
以下是输出-
Tim879 does not have all lowercase letters. tom consists of all lowercase letters.
热门推荐
10 医院探望朋友祝福语简短
11 毕业祝福语简短女朋友
12 春节虎年爸妈祝福语简短
13 儿童毕业祝福语 简短6
14 开工仪式横幅祝福语简短
15 孩子日常祝福语大全简短
16 清晨寄语诗句祝福语简短
17 结婚送亲认亲祝福语简短
18 虎年喝酒拜年祝福语简短