string strText = "江西省宜春市"; Response.Write(strText.Remove(3)); Response.Write("<br>"); Response.Write(strText.Replace("宜春市", "高安市")+"<br>");
String.Remove(4)删除第四个字符后所有内容
String.Replace(cahr1,char2)将char2的值替换char1的值
转载于:https://blog.51cto.com/1433189426/1381443