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