str_ascii_ucs4 Function

private pure function str_ascii_ucs4(input) result(output)

Arguments

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

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


Contents

Source Code


Source Code

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

   output = input
   endfunction str_ascii_ucs4