C Library Functions  - toupper (3)

NAME

toupper(3f) - [M_strings__chars:CASE] changes a character array to uppercase (LICENSE:MIT)

CONTENTS

Synopsis
Description
Options
Returns
Examples
Author
License

SYNOPSIS

pure function toupper(str) result (string)

    character(len=1),intent(in) :: str(:)
    character(len=1)            :: string(size(str))  ! output string

DESCRIPTION

toupper(string) returns a copy of the input characters with all characters converted to uppercase, assuming ASCII character sets are being used.

OPTIONS

str array of characters to convert to uppercase

RETURNS

toupper
  copy of the input array with all characters converted to uppercase.

EXAMPLES

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

AUTHOR

John S. Urban

LICENSE

Public Domain


Nemo Release 3.1 toupper (3) June 29, 2025
Generated by manServer 1.08 from 15718414-5d5d-43a1-81ac-0900b4500be4 using man macros.