1 Star 0 Fork 38

nygula / iisutil

forked from BoyTNT / iisutil 
加入 Gitee
与超过 1200万 开发者一起发现、参与优秀开源项目,私有仓库也完全免费 :)
免费加入
该仓库未声明开源许可证文件(LICENSE),使用请关注具体项目描述及其代码上游依赖。
克隆/下载
Extensions.cs 1.61 KB
一键复制 编辑 原始数据 按行查看 历史
BoyTNT 提交于 2013-08-29 09:05 . 1.0
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
namespace IISUtil
{
public static class Extensions
{
/// <summary>
/// 判断字符串是否相等
/// </summary>
/// <param name="text1"></param>
/// <param name="text2"></param>
/// <returns></returns>
public static bool EqualsEx(this string text1, string text2)
{
return string.Equals(text1, text2, StringComparison.CurrentCultureIgnoreCase);
}
/// <summary>
/// 判断是否包含字符串
/// </summary>
/// <param name="text"></param>
/// <param name="value"></param>
/// <returns></returns>
public static bool ContainsEx(this string text, string value)
{
return text.IndexOf(value, StringComparison.CurrentCultureIgnoreCase) >= 0;
}
/// <summary>
/// 判断是否以指定字符串开头
/// </summary>
/// <param name="text"></param>
/// <param name="value"></param>
/// <returns></returns>
public static bool StartWithEx(this string text, string value)
{
return text.StartsWith(value, StringComparison.CurrentCultureIgnoreCase);
}
/// <summary>
/// 判断是否以指定字符串结尾
/// </summary>
/// <param name="text"></param>
/// <param name="value"></param>
/// <returns></returns>
public static bool EndWithEx(this string text, string value)
{
return text.EndsWith(value, StringComparison.CurrentCultureIgnoreCase);
}
/// <summary>
/// 判断字符串是否空
/// </summary>
/// <param name="text"></param>
/// <returns></returns>
public static bool IsNullOrEmpty(this string text)
{
return string.IsNullOrEmpty(text);
}
}
}
C#
1
https://gitee.com/nygula/iisutil.git
git@gitee.com:nygula/iisutil.git
nygula
iisutil
iisutil
master

搜索帮助