C# 中截取 某个字符串 从某个字母开始的子字符串
static void Main(string[] args)
{
string str = "485269+3456";
char c = '+';
Console.WriteLine(str.Substring(str.IndexOf(c)+1));
Console.WriteLine(str.Substring(0,str.IndexOf(c)));
Console.ReadLine();
}
来自 “ ITPUB博客 ” ,链接:http://blog.itpub.net/26221264/viewspace-747125/,如需转载,请注明出处,否则将追究法律责任。
转载于:http://blog.itpub.net/26221264/viewspace-747125/