adjustr(string): Right Adjust String¶
Right adjust a string.
Declaration¶
Sintaxe¶
retval = adjustr(string)
elemental function adjustr(string)
Argumentos¶
string
: the input value must be of character type.
Valor de retorno¶
The return value is of type character and of the same kind as of input value
string
, with trailing spaces removed and same number of spaces added at the
start.
Descrição¶
adjustr(string) adjusts input string by removing any trailing spaces and adding same number of spaces at the start of the input string.
Tipos¶
Supported argument type is character.
interface repeat
module procedure repeati32, repeati64
end interface
contains
function adjustr(string)
character(len=*), intent(in) :: string
end function
Exemplos¶
program intrinsics_adjustr
implicit none
character(*), parameter :: s1 = "A B "
print *, adjustr(s1)
end program
Resultado:
A B