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 期末寄语简短祝福语高中
14 宝宝周岁可乐祝福语简短
15 老爸生日暴富祝福语简短
16 中式蛋糕开业祝福语简短
17 诗词送行祝福语大全简短
18 结婚对白誓言简短祝福语