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 教师闺蜜祝福语简短