insert Interface

public interface insert

Inserts a substring into another string at the specified index.


Contents


Module Procedures

private pure elemental function char_insert_char(str, start, substr) result(rst)

Inserts a substring into another string at the specified index.

Arguments

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

The string into which the substring will be inserted.

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

The starting index at which to insert the substring.

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

The substring to insert.

Return Value type(string)

The resulting string.

private pure elemental function char_insert_string(str, start, substr) result(rst)

Inserts a substring into another string at the specified index.

Arguments

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

The string into which the substring will be inserted.

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

The starting index at which to insert the substring.

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

The substring to insert.

Return Value type(string)

The resulting string.

private pure elemental function string_insert_char(str, start, substr) result(rst)

Inserts a substring into another string at the specified index.

Arguments

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

The string into which the substring will be inserted.

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

The starting index at which to insert the substring.

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

The substring to insert.

Return Value type(string)

The resulting string.

private pure elemental function string_insert_string(str, start, substr) result(rst)

Inserts a substring into another string at the specified index.

Arguments

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

The string into which the substring will be inserted.

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

The starting index at which to insert the substring.

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

The substring to insert.

Return Value type(string)

The resulting string.