ctype
PHP Manual

ctype_lower

(PHP 4 >= 4.0.4, PHP 5)

ctype_lower — 小文字かどうかを調べる

説明

bool ctype_lower ( string $text )

text のすべての文字が小文字だった場合に TRUE 、そうでない場合に FALSE を返します。

パラメータ

text

調べる文字列。

返り値

text のすべての文字がカレントのロケールで 小文字だった場合に TRUE 、そうでない場合に FALSE を返します。

Example#1 ctype_lower() の例(デフォルトのロケールを利用)

<?php
$strings 
= array('aac123''qiutoas''QASsdks');
foreach (
$strings as $testcase) {
    if (
ctype_lower($testcase)) {
        echo 
"The string $testcase consists of all lowercase letters.\n";
    } else {
        echo 
"The string $testcase does not consist of all lowercase letters.\n";
    }
}
?>

上の例の出力は以下となります。

The string aac123 does not consist of all lowercase letters.
The string qiutoas consists of all lowercase letters.
The string QASsdks does not consist of all lowercase letters.

参考


ctype
PHP Manual