find Interface

public interface find

Finds the starting index of substring 'pattern' in the input 'string' Specifications

Version: experimental


Contents


Module Procedures

private elemental function find_string_string(string, pattern, occurrence, consider_overlapping) result(res)

Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' in input 'string' Returns an integer

Arguments

TypeIntentOptionalAttributesName
type(string_type), intent(in) :: string
type(string_type), intent(in) :: pattern
integer, intent(in), optional :: occurrence
logical, intent(in), optional :: consider_overlapping

Return Value integer

private elemental function find_string_char(string, pattern, occurrence, consider_overlapping) result(res)

Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' in input 'string' Returns an integer

Arguments

TypeIntentOptionalAttributesName
type(string_type), intent(in) :: string
character(len=*), intent(in) :: pattern
integer, intent(in), optional :: occurrence
logical, intent(in), optional :: consider_overlapping

Return Value integer

private elemental function find_char_string(string, pattern, occurrence, consider_overlapping) result(res)

Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' in input 'string' Returns an integer

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: string
type(string_type), intent(in) :: pattern
integer, intent(in), optional :: occurrence
logical, intent(in), optional :: consider_overlapping

Return Value integer

private elemental function find_char_char(string, pattern, occurrence, consider_overlapping) result(res)

Returns the starting index of the 'occurrence'th occurrence of substring 'pattern' in input 'string' Returns an integer

Arguments

TypeIntentOptionalAttributesName
character(len=*), intent(in) :: string
character(len=*), intent(in) :: pattern
integer, intent(in), optional :: occurrence
logical, intent(in), optional :: consider_overlapping

Return Value integer