📜  定位特定字符串字母 c++ 代码示例

📅  最后修改于: 2022-03-11 14:44:53.579000             🧑  作者: Mango

代码示例1
string str ("There are two needles in this haystack.");
string str2 ("needle");

if (str.find(str2) != string::npos) {
//.. found.
}