CString strText = "hello world"; strText.Replace("world", "there"); // strText now contains "hello there"
CString strText = "123-456-7890"; strText.Replace('-', '.'); // strText now contains "123.456.7890"
CString strText = "one two three four five"; strText.Replace("o", "i"); strText.Replace("r", "z"); // strText now contains "ine tzo thiz fize fize"CString Replace is part of the CString class in the MFC library.