find Interface

public interface find

Finds the starting index of all substrings within a parent string.


Contents


Module Procedures

private pure function char_find_char(str, substr) result(rst)

Finds the starting index of all substrings within a parent string.

Arguments

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

The string to search.

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

The substring to search for.

Return Value integer(kind=int32), allocatable, dimension(:)

An array containing the starting index of each occurrence of substr in str.

private pure function char_find_str(str, substr) result(rst)

Finds the starting index of all substrings within a parent string.

Arguments

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

The string to search.

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

The substring to search for.

Return Value integer(kind=int32), allocatable, dimension(:)

An array containing the starting index of each occurrence of substr in str.

private pure function str_find_char(str, substr) result(rst)

Finds the starting index of all substrings within a parent string.

Arguments

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

The string to search.

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

The substring to search for.

Return Value integer(kind=int32), allocatable, dimension(:)

An array containing the starting index of each occurrence of substr in str.

private pure function str_find_str(str, substr) result(rst)

Finds the starting index of all substrings within a parent string.

Arguments

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

The string to search.

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

The substring to search for.

Return Value integer(kind=int32), allocatable, dimension(:)

An array containing the starting index of each occurrence of substr in str.