Convert string of any kind to UCS4 string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| class(*), | intent(in) | :: | input | Input string of any kind. |
Output string of UCS4 kind.
pure function ucs4_string(input) result(output)
!< Convert string of any kind to UCS4 string.
class(*), intent(in) :: input !< Input string of any kind.
character(len=:, kind=UCS4), allocatable :: output !< Output string of UCS4 kind.
select type(input)
#if defined ASCII_SUPPORTED && defined ASCII_NEQ_DEFAULT
type is(character(len=*, kind=ASCII))
output = input
#endif
#ifdef UCS4_SUPPORTED
type is(character(len=*, kind=UCS4))
output = input
#endif
type is(character(len=*))
output = input
endselect
endfunction ucs4_string