count Interface

public interface count

Returns the number of times substring 'pattern' has appeared in the input string 'string' Specifications


Module Procedures

private elemental function count_string_string(string, pattern, consider_overlapping) result(res)

Returns the number of times substring 'pattern' has appeared in the input string 'string' Returns an integer

Arguments

Type IntentOptional Attributes Name
type(string_type), intent(in) :: string
type(string_type), intent(in) :: pattern
logical, intent(in), optional :: consider_overlapping

Return Value integer

private elemental function count_string_char(string, pattern, consider_overlapping) result(res)

Returns the number of times substring 'pattern' has appeared in the input string 'string' Returns an integer

Arguments

Type IntentOptional Attributes Name
type(string_type), intent(in) :: string
character(len=*), intent(in) :: pattern
logical, intent(in), optional :: consider_overlapping

Return Value integer

private elemental function count_char_string(string, pattern, consider_overlapping) result(res)

Returns the number of times substring 'pattern' has appeared in the input string 'string' Returns an integer

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
type(string_type), intent(in) :: pattern
logical, intent(in), optional :: consider_overlapping

Return Value integer

private elemental function count_char_char(string, pattern, consider_overlapping) result(res)

Returns the number of times substring 'pattern' has appeared in the input string 'string' Returns an integer

Arguments

Type IntentOptional Attributes Name
character(len=*), intent(in) :: string
character(len=*), intent(in) :: pattern
logical, intent(in), optional :: consider_overlapping

Return Value integer