sadjustr Function

private elemental function sadjustr(self) result(adjusted)

Arguments

Type IntentOptional AttributesName
class(string), intent(in) :: self

The string.

Return Value type(string)

Adjusted string.

Description

Right adjust a string by removing leading spaces.


Source Code

  elemental function sadjustr(self) result(adjusted)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Right adjust a string by removing leading spaces.
  !---------------------------------------------------------------------------------------------------------------------------------
  class(string), intent(in) :: self     !< The string.
  type(string)              :: adjusted !< Adjusted string.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  adjusted = self
  if (allocated(adjusted%raw)) adjusted%raw = adjustr(adjusted%raw)
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction sadjustr