You can use regular expressions to check whether one character contains one uppercase letter:
$text 1 = ' This is the all lower-case '
$text 2 = ' lower-case ', ' Not all '
$text 1-cmatch ' [A-z] '
$text 2-cmatch ' [A-z] '
The result returns "true" or "false"
In turn, check to see if it contains lowercase, and you can try this:
$text 1 = ' This are all lower-case '
$text 2 = ' This is ' lower-case '
$text 1-cmatch ' ^[a-z\s-]*$ '
$text 2-c Match ' ^[a-z\s-]*$ '
The result returns "true" or "false"
Overall, this test is more difficult because you need to consider the legality of all characters. In this example, I used a lowercase string from A to Z, a space and a minus sign.
A valid string is embedded in the middle of "^" and "$" (it represents the start and end of a line). The asterisk represents quantifying any preceding legitimate strings.
Supports all PS versions