📜  替换字符串中的索引c#代码示例

📅  最后修改于: 2022-03-11 14:49:14.660000             🧑  作者: Mango

代码示例1
using System.Text;
var theString = "ABCDEF";
var sb = new StringBuilder(theString);
sb[2] = "r" //replace letter at index 2 with "r"
theString = sb.ToString(); //theString: "ABrDEF"