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 参加弟弟毕业祝福语简短