Left adjust a string by removing leading spaces (character output).
type(string) :: astring
astring = ' Hello World!'
print "(L1)", adjustl(astring)=='Hello World! '
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
class(string), | intent(in) | :: | s |
String. |
Adjusted string.
pure function sadjustl_character(s) result(adjusted)
!< Left adjust a string by removing leading spaces (character output).
!<
!<```fortran
!< type(string) :: astring
!< astring = ' Hello World!'
!< print "(L1)", adjustl(astring)=='Hello World! '
!<```
!=> T <<<
class(string), intent(in) :: s !< String.
character(kind=CK, len=:), allocatable :: adjusted !< Adjusted string.
if (allocated(s%raw)) adjusted = adjustl(s%raw)
endfunction sadjustl_character