ctype_lower ( $text );
此函数检查提供的字符串text中的所有字符是否都是小写字母。
Sr.No | Parameter & Description |
---|---|
1 |
text(必需) 匹配字符串。 链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-ctype-lower.html 来源:LearnFk无涯教程网 |
如果文本中的每个字符都是当前区域设置中的小写字母,则返回true。
<?php $strings=array('aac123', 'testing', "testin IS Done"); foreach ($strings as $test) { if (ctype_lower($test)) { echo "$test consists of all lowercase letters.\n"; }else { echo "$test does not have all lowercase letters.\n"; } } ?>
这将产生以下输出-
aac123 does not have all lowercase letters. testing consists of all lowercase letters. testin IS Done does not have all lowercase letters.
祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)