Returns the starting index of the ‘occurrence’th occurrence of substring ‘pattern’ in input ‘string’ Returns an integer
| Type | Intent | Optional | Attributes | Name | ||
|---|---|---|---|---|---|---|
| type(string_type), | intent(in) | :: | string | |||
| character(len=*), | intent(in) | :: | pattern | |||
| integer, | intent(in), | optional | :: | occurrence | ||
| logical, | intent(in), | optional | :: | consider_overlapping |
elemental function find_string_char(string, pattern, occurrence, consider_overlapping) result(res) type(string_type), intent(in) :: string character(len=*), intent(in) :: pattern integer, intent(in), optional :: occurrence logical, intent(in), optional :: consider_overlapping integer :: res res = find(char(string), pattern, occurrence, consider_overlapping) end function find_string_char