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