检测字符串中的分隔符

Detecting the Delimiter in a String

本文关键字:分隔符 字符串 检测      更新时间:2023-10-16

我正在浏览一些c++代码,并且遇到了这段我无法理解的代码。同样需要你的帮助:

int intStart = strMessage.Find("019=%ld"); //strMessage is of type: CString and contains a message with delimiters
intStart++;
int intEnd = strMessage.Find("0110=%ld");
intEnd++;

"019=%ld"answers"0110=%ld"显然是代码试图在字符串:strMessage中定位的一些特殊字符或符号。我想知道这里搜索的是哪个特殊字符或符号?如何找到它?

谢谢,

01为ASCII码为1的字符。后面的数字910都是数字

这可能有帮助

http://en.cppreference.com/w/cpp/language/escape

这里正在搜索哪个特殊字符或符号?

搜索以该特殊字符开头的整个子字符串,后面跟着引号文本的其余部分。