lower Function

public pure function lower(str) result(res)

Converts a string to lowercase characters. It works with this dataset 'aáäàâbcdeéëèêfghiíïìîjklmnñoóöòôpqrstuúüùûvwxyz'

Syntax

 t = lower(str)

Where:

  • str: String to convert to lowercase characters.

It returns the string converted to lowercase characters.

Example

The following program converts a string to lowercase:

 PROGRAM lowerExample
    USE FU_Strings, ONLY: lower
    IMPLICIT NONE
    CHARACTER(LEN=:), ALLOCATABLE :: text
    CHARACTER(LEN=:), ALLOCATABLE :: modified_text
    text = "Lorem ipsum dolor sit amet, consectetur adipiscing elit, &
       &sed do eiusmod tempor incididunt ut labore et dolore magna al&
       &iqua. Ut enim ad minim veniam, quis nostrud exercitation ulla&
       &mco laboris nisi ut aliquip ex ea commodo consequat. Duis aut&
       &e irure dolor in reprehenderit in voluptate velit esse cillum&
       & dolore eu fugiat nulla pariatur. Excepteur sint occaecat cup&
       &idatat non proident, sunt in culpa qui officia deserunt molli&
       &t anim id est laborum."
    modified_text = lower(text)
    WRITE(*,*) modified_text
 END PROGRAM lowerExample

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

String to convert to lowercase characters.

Return Value character(len=:), ALLOCATABLE

String converted to lowercase characters.


Contents