chomp_set_char_char Function

private pure function chomp_set_char_char(string, set) result(chomped_string)

Remove trailing characters in set from string.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
character(len=1), intent(in) :: set(:)

Return Value character(len=:), allocatable


Calls

proc~~chomp_set_char_char~~CallsGraph proc~chomp_set_char_char chomp_set_char_char proc~set_to_string set_to_string proc~chomp_set_char_char->proc~set_to_string

Called by

proc~~chomp_set_char_char~~CalledByGraph proc~chomp_set_char_char chomp_set_char_char interface~chomp chomp interface~chomp->proc~chomp_set_char_char proc~chomp_set_string_char chomp_set_string_char interface~chomp->proc~chomp_set_string_char proc~chomp_substring_char_string chomp_substring_char_string interface~chomp->proc~chomp_substring_char_string proc~chomp_substring_string_char chomp_substring_string_char interface~chomp->proc~chomp_substring_string_char proc~chomp_substring_string_string chomp_substring_string_string interface~chomp->proc~chomp_substring_string_string proc~chomp_set_string_char->interface~chomp proc~chomp_substring_char_string->interface~chomp proc~chomp_substring_string_char->interface~chomp proc~chomp_substring_string_string->interface~chomp

Variables

Type Visibility Attributes Name Initial
integer, private :: last

Source Code

   pure function chomp_set_char_char(string, set) result(chomped_string)
      character(len=*), intent(in) :: string
      character(len=1), intent(in) :: set(:)
      character(len=:), allocatable :: chomped_string
      integer :: last

      last = verify(string, set_to_string(set), back=.true.)
      chomped_string = string(1:last)

   end function chomp_set_char_char