Remove trailing substrings from string.
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_type), | intent(in) | :: | string | |||
| character(len=*), | intent(in) | :: | substring |
pure function chomp_substring_string_char(string, substring) 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=*), intent(in) :: substring type(string_type) :: chomped_string chomped_string = chomp(char(string), substring) end function chomp_substring_string_char