|
string, strlowcase, strupcase
The Fortran90 module misc_utils contains three functions to create or
manipulate character strings. Location in HEALPix directory tree:
src/f90/mod/misc_utils.F90
ARGUMENTS
name & dimensionality |
kind |
in/out |
description |
|
|
|
|
number |
LGT/ I4B/ SP/ DP |
IN |
number or boolean flag to be turned into a character string. |
instring |
CHR |
IN |
arbitrary character string. |
outstring |
CHR |
-- |
output character string. |
format OPTIONAL |
CHR |
IN |
character string describing Fortran
format of output. |
FUNCTIONS:
outstring = string(number [,format])
| |
| returns in outstring its argument number converted to a
character string. If format is provided it is used to
format the output, if not, the fortran default format
matching number's type is used. |
|
outstring = strlowcase(instring)
| |
| returns in outstring its argument instring
converted to lowercase. ASCII characters in the [A-Z] range
are mapped to [a-z], while all others remain unchanged. |
|
outstring = strupcase(instring)
| |
| returns in outstring its argument instring
converted to uppercase. ASCII characters in the [a-z] range
are mapped to [A-Z], while all others remain unchanged. |
|
EXAMPLE:
use misc_utils
character(len=24) :: s1
s1 = string(123,'(i5.5)')
print*, trim(s1)
print*,trim(strupcase('*aBcD-123'))
print*,trim(strlowcase('*aBcD-123'))
Will printout 00123, *ABCD-123 and *abcd-123.
Eric Hivon
2010-06-18
|
|