Php-function-ctype-lower
提供:Dev Guides
PHP-関数ctype_lower()
構文
ctype_lower ( $text );
定義と使い方
この関数は、指定された文字列、テキスト内のすべての文字が小文字であるかどうかをチェックします。
パラメーター
Sr.No | Parameter & Description |
---|---|
1 |
text(Required) テストされた文字列。 |
戻り値
テキスト内のすべての文字が現在のロケールで小文字の場合、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.