提问人:BoS 提问时间:5/24/2021 更新时间:5/24/2021 访问量:27
将双引号替换为单引号
Replace double quotes with single quotes
问:
我想将“1964”更改为“1964” 我尝试了所有组合,但没有成功
string rowString = "1964";
var myString = "1964";
var myStrin = Regex.Replace(myString, @"[\""]", "'", RegexOptions.IgnoreCase);
string y = rowString.Trim('"');
string yy = rowString.Replace("\"", String.Empty);
var yvc = rowString.Replace("\"", String.Empty);
rowString = rowString.Replace("\"", "'");
rowString.Trim('"', '\'', ' ');
rowString = rowString.Replace('"', ' ').Trim();
var somestring = rowString.Replace('"', ' ').Trim();
rowString = rowString.Replace("'", "''");
string strgs = rowString.Replace("'", "''");
string strgg = rowString.Replace("\"", "'");
string strgod = rowString.Replace("\"", "'");
string strgodd = rowString.Replace("\"", "").Replace("'", "");
答:
0赞
user2599052
5/24/2021
#1
说干就干var newString= "'" +myString + "'"
评论