Remove trailing characters in set from string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_type), | intent(in) | :: | string | |||
| character(len=1), | intent(in) | :: | set(:) |
pure function chomp_set_string_char(string, set) result(chomped_string) ! Avoid polluting the module scope and use the assignment only in this scope use pic_string_type, only: assignment(=) type(string_type), intent(in) :: string character(len=1), intent(in) :: set(:) type(string_type) :: chomped_string chomped_string = chomp(char(string), set) end function chomp_set_string_char