相关疑难解决方法(0)

如何忽略String.replace中的大小写

string sentence = "We know it contains 'camel' word.";
// Camel can be in different cases:
string s1 = "CAMEL";
string s2 = "CaMEL";
string s3 = "CAMeL";
// ...
string s4 = "Camel";
// ...
string s5 = "camel";
Run Code Online (Sandbox Code Playgroud)

尽管string.Replace不支持ignoreCase左弦,如何用"马"代替"骆驼" ?

c# string replace ignore-case

39
推荐指数
4
解决办法
4万
查看次数

标签 统计

c# ×1

ignore-case ×1

replace ×1

string ×1