-
C#入门经典教程:字符串修改指南
资源介绍
字符串修改
Insert(int, string)
string str = "and he stoppeth three";
string verse = str.Insert(str.IndexOf(" three"), " one of");
PadRight, PadLeft
string rem = "and so on";
rem = rem.PadRight(rem.Length + 3, '.');
Remove(P, n)
Replace(A, B)
string str = “nap ace sap path";
string verse = str.Replace(‘a’, ‘i’);
verse = str.Replace(“a”, “i”);
- 上一篇: StringBuilder类-C#入门经典教程
- 下一篇: 科学计数法格式(E或e)-C#入门经典教程