Check if array of TYPE(STRING_T) matches a particular CHARACTER string
Type | Intent | Optional | Attributes | Name | ||
---|---|---|---|---|---|---|
character(len=*), | intent(in) | :: | search_string | |||
type(string_t), | intent(in) | :: | array(:) |
logical function string_array_contains(search_string,array) character(*), intent(in) :: search_string type(string_t), intent(in) :: array(:) integer :: i string_array_contains = any([(array(i)%s==search_string, & i=1,size(array))]) end function string_array_contains