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.
public pure function is_lower(c)
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:
#include <stdlib.h>
answer = is_lower('b');
print *, answer
When the code above is run, the result will be as shown below:
true