replace Interface

public interface replace

Replaces the substring identified by the supplied regular expression pattern with a new substring.


Contents


Module Procedures

private pure elemental function char_replace_char_char(src, old, substr) result(rst)

Replaces all instances of a substring within a parent string.

Arguments

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

The string on which to operate.

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

The string to replace.

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

The new substring.

Return Value type(string)

The resulting string.

private pure elemental function char_replace_char_string(src, old, substr) result(rst)

Replaces all instances of a substring within a parent string.

Arguments

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

The string on which to operate.

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

The string to replace.

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

The new substring.

Return Value type(string)

The resulting string.

private pure elemental function char_replace_string_char(src, old, substr) result(rst)

Replaces all instances of a substring within a parent string.

Arguments

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

The string on which to operate.

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

The string to replace.

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

The new substring.

Return Value type(string)

The resulting string.

private pure elemental function char_replace_string_string(src, old, substr) result(rst)

Replaces all instances of a substring within a parent string.

Arguments

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

The string on which to operate.

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

The string to replace.

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

The new substring.

Return Value type(string)

The resulting string.

private pure elemental function string_replace_char_char(src, old, substr) result(rst)

Replaces all instances of a substring within a parent string.

Arguments

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

The string on which to operate.

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

The string to replace.

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

The new substring.

Return Value type(string)

The resulting string.

private pure elemental function string_replace_char_string(src, old, substr) result(rst)

Replaces all instances of a substring within a parent string.

Arguments

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

The string on which to operate.

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

The string to replace.

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

The new substring.

Return Value type(string)

The resulting string.

private pure elemental function string_replace_string_char(src, old, substr) result(rst)

Replaces all instances of a substring within a parent string.

Arguments

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

The string on which to operate.

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

The string to replace.

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

The new substring.

Return Value type(string)

The resulting string.

private pure elemental function string_replace_string_string(src, old, substr) result(rst)

Replaces all instances of a substring within a parent string.

Arguments

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

The string on which to operate.

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

The string to replace.

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

The new substring.

Return Value type(string)

The resulting string.