📌  相关文章
📜  c++ 获取两个字符之间的字符串 - C++ 代码示例

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

代码示例1
string str = "STARTDELIMITER_0_192.168.1.18_STOPDELIMITER";
unsigned first = str.find(STARTDELIMITER);
unsigned last = str.find_last_of(STOPDELIMITER);
string strNew = str.substr (first,last-first);
std::cout << strNew << std::endl;