toupper(3f) - [M_strings__chars:CASE] changes a character array to uppercase (LICENSE:MIT)
Synopsis
Description
Options
Returns
Examples
Author
License
pure function toupper(str) result (string)
character(len=1),intent(in) :: str(:) character(len=1) :: string(size(str)) ! output string
toupper(string) returns a copy of the input characters with all characters converted to uppercase, assuming ASCII character sets are being used.
str array of characters to convert to uppercase
toupper copy of the input array with all characters converted to uppercase.
Sample program:
program demo_toupper use M_strings__chars, only: toupper implicit none character(len=1),allocatable :: s(:) s=transfer( ABCDEFG abcdefg ,A,size=17) write(*,*) mixed-case input string is ....,s write(*,*) upper-case output string is ...,toupper(s) end program demo_toupper
John S. Urban
Public Domain
Nemo Release 3.1 | toupper (3) | June 29, 2025 |