MFC Cstring 取中间字符串

    技术2024-12-20  5

    CString Substr(const CString& str, const CString& str1, const CString& str2) { auto pos = str.Find(str1); if (pos == -1) return "<error>"; auto pos1 = str.Find(str2); if (pos1 == -1) return "</error>"; pos += str1.GetLength(); return str.Mid(pos, pos1 - pos); }
    Processed: 0.020, SQL: 9