is_lower(c)
is a public pure function in the stdlib_ascii
module: this module provides methods to manipulate and handle intrinsic character variables and constants.
The is_lower()
function checks whether its argument is a lowercase ASCII letter (a–z) or not.
c
is the character to test.The function returns a logical value.
It will return
true
if the character is a lowercase ASCII letter andfalse
otherwise.
The code snippet below demonstrates the use of is_lower
in Fortran:
<h2>include <stdlib.h></h2>
answer = is_lower('b');
print *, answer
When the code above is run, the result will be as shown below:
true