islower(c::Union{Char,AbstractString}) -> Bool

Tests whether a character is a lowercase letter, or whether this is true for all elements of a string. A character is classified as lowercase if it belongs to Unicode category Ll, Letter: Lowercase.


  1. Check if a character is lowercase:

    julia> islower('a')

    This example checks if the character 'a' is lowercase. The function returns true since 'a' is indeed a lowercase letter.

  2. Check if a string contains only lowercase letters:

    julia> islower("hello")

    It checks if all characters in the string "hello" are lowercase. Since all the characters in the string are lowercase, the function returns true.

  3. Handle mixed case strings:

    julia> islower("HeLLo")

    In this example, the function checks if the string "HeLLo" contains only lowercase letters. Since the string contains uppercase letters, the function returns false.

  4. Handle empty strings:

    julia> islower("")

    When an empty string is provided, the function returns true since there are no uppercase letters present.

Common mistake example:

julia> islower('A')

In this example, the function is used to check if the character 'A' is lowercase. However, since 'A' is an uppercase letter, the function should return false instead of true. It's important to understand that islower specifically checks for lowercase letters.

See Also

digits, inf, isdigit, iseven, isfinite, isless, islower, isnumber, isodd, isprime, isqrt, issorted, issubnormal, isxdigit, nan,

User Contributed Notes

Add a Note

The format of note supported is markdown, use triple backtick to start and end a code block.

*Required Field

Checking you are not a robot: