jQuery isn't a string library, so you wouldn't be likely to find such a
function in jQuery.

If you'll be doing much string manipulation, I'd suggest getting familiar
with the methods that JavaScript itself provides for all strings. These make
it easy to write your own functions for cases like this.

 For example:

    function isUpperCase( string ) {
        return string == string.toUpperCase();
    }

That will return false if there are any lowercase characters in the string,
or true if there are no lowercase characters. That's what I assume you mean,
e.g. "ABC" and "A B C" would both return true, while "abc", "Abc", and "A b
c" would return false.

If you want to check that the string contains *only* uppercase characters
and no "case-less" characters (so that "ABC" would return true but "A B C"
would return false), that would be a bit more work. Which are you are
looking for?

-Mike 

> From: LindsayT
> 
> Random, but probably easy, question:  Is there a jQuery 
> function that, given a string, can detect that it's in all 
> capital letters?
> 
> Lindsay

Reply via email to