- using System;
-
- class All
- {
- class program
- {
- static void Main(string[] args)
- {
- string str = Console.ReadLine();
- Console.WriteLine(str.Length);
- if(str.Contains("a"))//判断是否包括某子串
- Console.WriteLine(str.IndexOf("a"));//查找
- str = str.Insert(2, "hello");//插入
- Console.WriteLine(str);
- Console.WriteLine(str.Replace("hello", "me"));//替换
- }
- }
- }