且构网

分享程序员开发的那些事...
且构网 - 分享程序员编程开发的那些事

如何找到一个特殊字符串并替换该字符串

更新时间:2023-02-06 17:39:23

String.Replace(string,string) [ ^ ]



String.Replace(string,string)[^]

string myString = "The word cool is replaced in this string";
string newString = myString.Replace("cool", "awesome");





newstring现在等于在这个字符串中替换了awesome这个词



newstring now equals "The word awesome is replaced in this string"