str_del Subroutine

public subroutine str_del(str, substr, n)

Deletes first n occurrences of substring substr from string str and shifts characters left to fill hole. If n < 0, all occurances are deleted. If n is not explicitly provided, it defaults to removing the first occurrence. Trailing spaces or blanks are not considered part of substr.

Arguments

Type IntentOptional AttributesName
character(len=*), intent(inout) :: str
character(len=*), intent(in) :: substr
integer, intent(in), optional :: n

Contents

None