strim Function

public elemental function strim(self) result(trimmed)

Arguments

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

The string.

Return Value type(string)

Trimmed string.

Description

Remove leading spaces.

Called By

proc~~strim~~CalledByGraph proc~strim strim interface~trim trim interface~trim->proc~strim
Help

Source Code

  elemental function strim(self) result(trimmed)
  !---------------------------------------------------------------------------------------------------------------------------------
  !< Remove leading spaces.
  !---------------------------------------------------------------------------------------------------------------------------------
  class(string), intent(in) :: self    !< The string.
  type(string)              :: trimmed !< Trimmed string.
  !---------------------------------------------------------------------------------------------------------------------------------

  !---------------------------------------------------------------------------------------------------------------------------------
  trimmed = self
  if (allocated(trimmed%raw)) trimmed%raw = trim(trimmed%raw)
  return
  !---------------------------------------------------------------------------------------------------------------------------------
  endfunction strim