str_ucs4_ascii Function

private pure function str_ucs4_ascii(input) result(output)

Arguments

TypeIntentOptionalAttributesName
character(kind=ASCII,len=*), intent(in) :: input

Return Value character(kind=UCS4,len=:),allocatable


Contents

Source Code


Source Code

   pure function str_ucs4_ascii(input) result(output)
   !< Convert string of ASCII kind to UCS4 string.
   !<
   !<```fortran
   !< use penf
   !< character(len=:, kind=UCS4), allocatable :: string
   !< string = str_ascii(ASCII_'I was ASCII kind, but now I am UCS4')
   !< print "(A)", string
   !<```
   !=> I was ASCII kind, but now I am UCS4 <<<
   character(len=*, kind=ASCII), intent(in) :: input  !< Input string of ASCII kind.
   character(len=:, kind=UCS4), allocatable :: output !< Output string of UCS4 kind.

   output = input
   endfunction str_ucs4_ascii