Test whether a value is present in an array.
The .contains. operator provides convenient membership testing between arrays of intrinsic characters and arrays of string objects.
Supported combinations are:
The comparison uses the overloaded equality operator (==) associated with the involved types.
Arrays of string:
Mixed character/string usage:
Empty arrays:
Definition at line 323 of file string.f90.
| logical function characters_contain_character | ( | character(*), dimension(:), intent(in) | lhs, |
| character(*), intent(in) | rhs ) |
Checks whether an array of character contains a given character expression.
| [in] | lhs | array of character |
| [in] | rhs | character expression to search for |
Definition at line 972 of file string.f90.
| logical function characters_contain_string | ( | character(*), dimension(:), intent(in) | lhs, |
| type(string), intent(in) | rhs ) |
Checks whether an array of character contains a given string.
| [in] | lhs | array of character |
| [in] | rhs | string to search for |
Definition at line 993 of file string.f90.
| logical function strings_contain_character | ( | type(string), dimension(:), intent(in) | lhs, |
| character(*), intent(in) | rhs ) |
Checks whether an array of string contains a given character expression.
| [in] | lhs | array of string |
| [in] | rhs | character expression to search for |
Definition at line 951 of file string.f90.
| logical function strings_contain_string | ( | type(string), dimension(:), intent(in) | lhs, |
| type(string), intent(in) | rhs ) |
Checks whether an array of string contains a given string.
| [in] | lhs | array of string |
| [in] | rhs | string to search for |
Definition at line 930 of file string.f90.