remove Interface

public interface remove

Removes a range of characters from the string.


Contents


Module Procedures

private pure elemental function remove_char(str, start, finish) result(rst)

Removes a range of characters from the string.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

The string on which to operate.

integer(kind=int32), intent(in), optional :: start

OPTIONAL: The starting index. The default is 1.

integer(kind=int32), intent(in), optional :: finish

OPTIONAL: The finishing index. The default is len(str)

Return Value type(string)

The resulting string.

private pure elemental function remove_string(str, start, finish) result(rst)

Removes a range of characters from the string.

Arguments

Type IntentOptional Attributes Name
type(string), intent(in) :: str

The string on which to operate.

integer(kind=int32), intent(in), optional :: start

OPTIONAL: The starting index. The default is 1.

integer(kind=int32), intent(in), optional :: finish

OPTIONAL: The finishing index. The default is len(str)

Return Value type(string)

The resulting string.

private pure elemental function char_remove_char(str, substr) result(rst)

Removes the first occurrence of the specified substring from the string.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

The string from which to remove the substring.

character(len=*), intent(in) :: substr

The substring to remove.

Return Value type(string)

The resulting string.

private pure elemental function char_remove_string(str, substr) result(rst)

Removes the first occurrence of the specified substring from the string.

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: str

The string from which to remove the substring.

type(string), intent(in) :: substr

The substring to remove.

Return Value type(string)

The resulting string.

private pure elemental function string_remove_char(str, substr) result(rst)

Removes the first occurrence of the specified substring from the string.

Arguments

Type IntentOptional Attributes Name
type(string), intent(in) :: str

The string from which to remove the substring.

character(len=*), intent(in) :: substr

The substring to remove.

Return Value type(string)

The resulting string.

private pure elemental function string_remove_string(str, substr) result(rst)

Removes the first occurrence of the specified substring from the string.

Arguments

Type IntentOptional Attributes Name
type(string), intent(in) :: str

The string from which to remove the substring.

type(string), intent(in) :: substr

The substring to remove.

Return Value type(string)

The resulting string.