您的位置:首页 > 其它

判断字符串是否以指定的字符串结尾

2012-02-22 09:53 274 查看
using System;

namespace ConsoleApplication2
{
class Program
{
static void Main(string[] args)
{
string str = "http://www.baidu.com/";
if(str.EndsWith("com/"))// 判断字符串是否以指定的字符串结尾
{
Console.WriteLine("是网址。");
}

Console.ReadKey();
}
}

}
内容来自用户分享和网络整理,不保证内容的准确性,如有侵权内容,可联系管理员处理 点击这里给我发消息
标签: 
相关文章推荐