Skip to content

Commit 56740fc

Browse files
committed
Update stdlib_ascii.f90
Correct the is_lower function - I overlooked that one.
1 parent 0b60a39 commit 56740fc

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

src/stdlib_ascii.f90

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -151,7 +151,9 @@ pure logical function is_printable(c)
151151
!> Checks whether `c` is a lowercase ASCII letter (a .. z).
152152
pure logical function is_lower(c)
153153
character(len=1), intent(in) :: c !! The character to test.
154-
is_lower = (c >= 'a') .and. (c <= 'z')
154+
integer :: ic
155+
ic = iachar(c)
156+
is_lower = (ic >= iachar('a')) .and. (ic <= iachar('z'))
155157
end function
156158

157159
!> Checks whether `c` is an uppercase ASCII letter (A .. Z).

0 commit comments

Comments
 (0)