Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | self | The string. |
Result of the test.
Return true if all characters in the string are lowercase.
Type | Visibility | Attributes | Name | Initial | |||
---|---|---|---|---|---|---|---|
integer, | public | :: | c | Character counter. |
elemental function is_lower(self)
!---------------------------------------------------------------------------------------------------------------------------------
!< Return true if all characters in the string are lowercase.
!---------------------------------------------------------------------------------------------------------------------------------
class(string), intent(in) :: self !< The string.
logical :: is_lower !< Result of the test.
integer :: c !< Character counter.
!---------------------------------------------------------------------------------------------------------------------------------
!---------------------------------------------------------------------------------------------------------------------------------
is_lower = .false.
if (allocated(self%raw)) then
is_lower = .true.
do c=1, len(self%raw)
if (index(UPPER_ALPHABET, self%raw(c:c))>0) then
is_lower = .false.
exit
endif
enddo
endif
return
!---------------------------------------------------------------------------------------------------------------------------------
endfunction is_lower