sadjustr_character Function

private pure function sadjustr_character(s) result(adjusted)

Right adjust a string by removing leading spaces (character output).

 type(string) :: astring
 astring = 'Hello World!   '
 print "(L1)", adjustr(astring)=='   Hello World!'

Arguments

Type IntentOptional Attributes Name
class(string), intent(in) :: s

String.

Return Value character(kind=CK, len=:), allocatable

Adjusted string.


Called by

proc~~sadjustr_character~~CalledByGraph proc~sadjustr_character stringifor_string_t::sadjustr_character interface~adjustr stringifor_string_t::adjustr interface~adjustr->proc~sadjustr_character

Contents

Source Code


Source Code

   pure function sadjustr_character(s) result(adjusted)
   !< Right adjust a string by removing leading spaces (character output).
   !<
   !<```fortran
   !< type(string) :: astring
   !< astring = 'Hello World!   '
   !< print "(L1)", adjustr(astring)=='   Hello World!'
   !<```
   !=> T <<<
   class(string), intent(in)              :: s        !< String.
   character(kind=CK, len=:), allocatable :: adjusted !< Adjusted string.

   if (allocated(s%raw)) adjusted = adjustr(s%raw)
   endfunction sadjustr_character