Make the whole string to lower case
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | text | Input string of any case |
Output string of lower case
function lcase(text) result(res)
!< Make the whole string to lower case
CHARACTER(len=*), intent(in) :: text
!< Input string of any case
character(len=STRING_BUFFER_LENGTH) :: res
!< Output string of lower case
integer :: I,C
res=text
DO I = 1,LEN(TEXT)
C = INDEX("ABCDEFGHIJKLMNOPQRSTUVWXYZ",TEXT(I:I))
IF (C.GT.0) res(I:I) = "abcdefghijklmnopqrstuvwxyz"(C:C)
END DO
end function lcase