27 lines
857 B
C#
27 lines
857 B
C#
namespace Falcon.Extend
|
||
{
|
||
/// <summary>
|
||
/// 字符串处理扩展
|
||
/// </summary>
|
||
public static class StringExtend
|
||
{
|
||
/// <summary>
|
||
/// 是否为Null或Empty
|
||
/// </summary>
|
||
/// <param name="str">要判断的字符串</param>
|
||
/// <returns>如果为Null或Empty返回True,否则False</returns>
|
||
public static bool IsNullOrEmpty(this string str) {
|
||
return str == null ? true : string.IsNullOrEmpty(str);
|
||
}
|
||
|
||
/// <summary>
|
||
/// 是否为Null或Empty
|
||
/// </summary>
|
||
/// <param name="str">要判断的字符串</param>
|
||
/// <returns>如果为Null或Empty返回True,否则False</returns>
|
||
public static bool IsNotNullOrEmpty(this string str) {
|
||
return !str.IsNullOrEmpty();
|
||
}
|
||
}
|
||
}
|