STL_examples.cpp
TEST(find_first_of, ExampleOne) {
    const std::vector<char> v{'1', '2', 'w', 'o', 'r', 'd', '3', '3'};
    const std::vector<char> sequence = {'w', 'r', 'd'};
    const auto iterator = std::find_first_of(v.cbegin(), v.cend(), sequence.cbegin(), sequence.cend());
    EXPECT_EQ(*iterator, 'w');
    EXPECT_EQ(iterator - v.cbegin(), 2);
}
// Note that find_first_of() is looking for ANY of the elements
// in the search range. This is different from search(), which is looking
// for the entire sequence.
Note that find_first_of() is looking for ANY of the elements
in the search range. This is different from search(), which is looking
for the entire sequence.
Note that find_first_of () is looking for ANY of the elements in the search range . This is different from search () which is looking for the entire sequence .
TEST(find_first_of, ExampleOne) {
    const std::vector<char> v{'1', '2', 'w', 'o', 'r', 'd', '3', '3'};
    const std::vector<char> sequence = {'w', 'r', 'd'};
    const auto iterator = std::find_first_of(v.cbegin(), v.cend(), sequence.cbegin(), sequence.cend());
    EXPECT_EQ(*iterator, 'w');
    EXPECT_EQ(iterator - v.cbegin(), 2);
}
TEST ( find_first_of , ExampleOne ) { const std :: vector < char > v { ' ' , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' , ' ' } ; const std :: vector < char > sequence = { ' ' , ' ' , ' ' } ; const auto iterator = std :: find_first_of ( v . cbegin ( ) , v . cend ( ) , sequence . cbegin ( ) , sequence . cend ( ) ) ; EXPECT_EQ ( * iterator , ' ' ) ; EXPECT_EQ ( iterator - v . cbegin ( ) , 2 ) ; }
Note that find_first_of() is looking for ANY of the elements
in the search range.
Note that find_first_of () is looking for ANY of the elements in the search range .