Convert string of ASCII kind to ASCII string, just for convenience in sanitize strings.
use penf
character(len=:, kind=ASCII), allocatable :: string
string = str_ascii('I was ASCII kind and I am still ASCII')
print "(A)", string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(kind=ASCII,len=*), | intent(in) | :: | input | Input string of ASCII kind. |
Output string of ASCII kind.
pure function str_ascii_ascii(input) result(output)
!< Convert string of ASCII kind to ASCII string, just for convenience in sanitize strings.
!<
!<```fortran
!< use penf
!< character(len=:, kind=ASCII), allocatable :: string
!< string = str_ascii('I was ASCII kind and I am still ASCII')
!< print "(A)", string
!<```
!=> I was ASCII kind and I am still ASCII <<<
character(len=*, kind=ASCII), intent(in) :: input !< Input string of ASCII kind.
character(len=:, kind=ASCII), allocatable :: output !< Output string of ASCII kind.
output = input
endfunction str_ascii_ascii