Re: Determine if string is all uppercase?



"Angela" <angela@xxxxxxxxxxx> schreef in bericht
news:QeGLi.34982$nO3.27264@xxxxxxxxxxx
Hello

Is there a simple way to determine if a string is all in uppercase
characters?


Thanks

if ($string == strtoupper($string))
echo "It's all uppercase!";

Frank


.



Relevant Pages

  • Re: help understanding an ereg expression
    ... echo 'matches!'; ... Why does $string = 'te\st' yield a match? ... cial characters, including \', lose their special significance within ... depends on the definition of safe. ...
    (comp.lang.php)
  • Re: String variable read from Mysql DB + echo = Newline problem
    ... echo "$formatting2"; ... create the variable inline in my php script. ... barfs if I pass the string I got from the DB. ... However, when read in from an external source, these are the characters "backslash" and "en". ...
    (comp.lang.php)
  • Re: Escapeism
    ... Today I'm in a different mood and don't give up. ... How do you echo them using print? ... "rawrification" applies only to string literals and not to string ... you've overlooked the fact that if you print the string containing the two characters "backslash" and "lower case a" then it will print exactly those two characters. ...
    (comp.lang.python)
  • Re: [PHP] generating an html intro text ...
    ... > html and htmlentities that may be part of the content. ... > original string: ... HTML special characters ... echo $str."\n"; ...
    (php.general)
  • Re: quick sed question
    ... How do I strip the first two characters from the string, ... echo $FILE|sed s/^..// ...
    (uk.comp.os.linux)