1.字符串和正则表达式
1,CompareTo()方法,比较字符串的内容
2,Replace()用另一个字符或者字符串替换字符串中给定的字符或者字符串
3,Split()在出现给定字符的地方,把字符串拆分称一个字符串数组
4,SubString()在字符串中检索给定位置的子字符串
5,ToLower()把字符串转换成小写形式
6,ToUpper()把字符串转换成大写形式
7,Trim()删除首尾的空白
8,Concat()方法,合并字符串
9,CopyTo()方法,把字符串中指定的字符复制到一个数组中
10,Format()方法,格式化字符串
11,IndexOf()方法,取得字符串第一次出现某个给定字符串或者字符的位置,判断是否包含子字符串
12,IndexOfAny()方法,
13,Insert()把一个字符串实例插入到另一个字符串实例的制定索引处
14,Join()合并字符串数组,创建一个新字符串
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace 字符串String
{
class Program
{
static void Main(string[] args)
{
// string s = "www.devsiki.com"; //使用string类型去存储字符串类型,使用双引号引起来
//int lengh = s.Length;
//if (s == "www.devsiki.com")
//{
// Console.WriteLine("相同");
//}
//else
//{
// Console.WriteLine("不相同");
//}
//Console.WriteLine(lengh);
//s = "http://" + s;
//Console.WriteLine(s);
//char c = s[3];
//Console.Write(c);
//for(int i = 0; i < s.Length; i++)
//{
// Console.WriteLine(s[i]);
//}
//string s = "si,ki";
////int res = s.CompareTo("szki"); //当两个字符串相等的时候,返回0,当s在字母表排序靠前的时候,返回-1,否则返回1
////Console.WriteLine(res);
//// string newStr= s.Replace(',', '-');
//string newStr = s.Replace(",", "---"); //把指定的字符换成指定的字符或者字符串
//Console.Write(n