Replace
使用测试
CString mSectNameNew = L"槽a*b*c*d";CString mSectNameNew2 = L"Ca*b*c*d";CString mSectNameNew3 = L"[a*b*c*d";mSectNameNew.Replace(_T("M"), _T("C")); // 不会替换mSectNameNew.Replace(_T("槽"), _T("C")); // Ca*b*c*dmSectNameNew.Replace(_T("X"), _T("C")); // Xa*b*c*dmSectNameNew.Replace(_T("C"), _T("W")); // 不会替换mSectNameNew2.Replace(_T("C"), _T("XW")); // XWa*b*c*dmSectNameNew3.Replace(_T("["), _T("")); // a*b*c*d