하나의 문자열 집합과 일부 두 번째 문자열이 있습니다. 그리고 그 세트를 반복하여 현재 문자열이 두 번째 문자열에 포함되어 있는지 결정하려고합니다. STL
에서 제공되는 도구가 있습니까? 아니면 그 중 어떤 도구를 사용해도 쉽게 작업 할 수 있습니까?한 문자열에 다른 문자열이 포함되어 있는지 확인하는 방법
#include <cctype>
#include <iostream>
#include <iomanip>
#include <set>
#include <list>
#include <map>
#include <vector>
#include <queue>
#include <string>
은 Usecase :
물론test1 . Add (0, "hello");
test1 . Add (1, "world");
test1 . Add (2, "rld");
test1 . Add (3, "ell");
test1 . Add (4, "hell");
printSet (test1 . Search ("hello world!"));
// 0, 1, 2, 3, 4
printSet (test1 . Search ("hEllo world!"));
// 1, 2
, 나는 문자로 그것을 문자열로 문자열, 문자를 비교하거나 일부 자동 장치를 만들지 만, 그들이 왜 acutally보다 더 열심히 일을 할 수있는 :
['표준 : : 문자열 : 찾을 수를()'] 도움이되기를 바랍니다 (http://en.cppreference.com/w/cpp/string/basic_string/find) ?? – hmjd