文件名称:字符串修改-C#入门经典教程
文件大小:4.81MB
文件格式:PPT
更新时间:2024-05-13 13:36:55
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”);