特殊字符派"|"的字符串冲突find_first_of
find_first_of of string conflicts for special char pie "|"
在下面的代码中,我在一个包含"|"的文本中找到了"||",但它仍然说它存在?如何解决这个问题?
std::string sInputText = "test||111";
std::string delimeter = "||";
int pos = 0;
found = sInputText.find_first_of(delimeter);
if (found == string::npos)
{
}
阅读规范…
在字符串中搜索与其参数中指定的任何字符匹配的第一个字符。
相关文章:
- std::map<struct,struct>::find 找不到匹配项,但是如果我循环通过 begin() 到 end(),我在那里看到匹配项
- Usages of std::move
- OpenMP卸载说'fatal error: could not find accel/nvptx-none/mkoffload'
- 使用.find函数在c++中查找字符和另一个字符之间的大小
- 使用 [] 运算符时"binding reference of type discards qualifiers"
- 如何处理 c++ 中类实现中的"invalid use of non-static data member"?
- 具有变量Number of Arguments的std::函数的矢量
- 在 QVector<std::unique_ptr 上使用 std::find<Type>>
- Capacity of a deque
- 错误"Could not find Boost"(缺少:上下文标头)
- Deprecation of _writeBarrier()
- C++ 错误:"cannot find bounds of current function"
- Opengl "Cannot find bounds of current function"
- C++ 字符串迭代器"find first of"
- C++:"find non zero-elements of cv::mat"无法按预期工作
- 代码::块调试器,"Cannot find the bounds of current function"
- std::vector of std::functions find
- Merits of std::find
- 如何开始数学挑战"find the sum of the multiples of X under Y"?
- 无法使用opencv执行简单程序,错误"Can't find the entry point of the procedure"