PHP 中的 ctype_lower()函数

首页 / PHP入门教程 / PHP 中的 ctype_lower()函数

ctype_lower() - 语法

ctype_lower ( $text );

此函数检查提供的字符串text中的所有字符是否都是小写字母。

Sr.No Parameter & Description
1

text(必需)

匹配字符串。

无涯教程网

链接:https://www.learnfk.comhttps://www.learnfk.com/php/php-function-ctype-lower.html

来源:LearnFk无涯教程网

ctype_lower() - 返回值

如果文本中的每个字符都是当前区域设置中的小写字母,则返回true。

ctype_lower() - 示例

<?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.

祝学习愉快!(内容编辑有误?请选中要编辑内容 -> 右键 -> 修改 -> 提交!)

技术教程推荐

算法面试通关40讲 -〔覃超〕

从0开始做增长 -〔刘津〕

ZooKeeper实战与源码剖析 -〔么敬国〕

Service Mesh实战 -〔马若飞〕

容器实战高手课 -〔李程远〕

Spring编程常见错误50例 -〔傅健〕

Web漏洞挖掘实战 -〔王昊天〕

云时代的JVM原理与实战 -〔康杨〕

LangChain 实战课 -〔黄佳〕

好记忆不如烂笔头。留下您的足迹吧 :)