count_string_char Function

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


Called by

proc~~count_string_char~~CalledByGraph proc~count_string_char count_string_char interface~count count interface~count->proc~count_string_char

Source Code

   elemental function count_string_char(string, pattern, consider_overlapping) result(res)
      type(string_type), intent(in) :: string
      character(len=*), intent(in) :: pattern
      logical, intent(in), optional :: consider_overlapping
      integer :: res

      res = count(char(string), pattern, consider_overlapping)

   end function count_string_char