Convert string of default kind to UCS4 string.
use penf
character(len=:, kind=UCS4), allocatable :: string
string = str_ascii('I was DEFAULT kind, but now I am UCS4')
print "(A)", string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | input | Input string of default kind. |
Output string of UCS4 kind.
pure function str_ucs4_default(input) result(output)
!< Convert string of default kind to UCS4 string.
!<
!<```fortran
!< use penf
!< character(len=:, kind=UCS4), allocatable :: string
!< string = str_ascii('I was DEFAULT kind, but now I am UCS4')
!< print "(A)", string
!<```
!=> I was DEFAULT kind, but now I am UCS4 <<<
character(len=*), intent(in) :: input !< Input string of default kind.
character(len=:, kind=UCS4), allocatable :: output !< Output string of UCS4 kind.
output = input
endfunction str_ucs4_default