namespace FAuth.Extensions { public static class StringExtend { /// /// 扩展判断字符串是否为null或空方法 /// /// 字符串 /// 如果为Null或Empty或空返回True,否则返回false public static bool IsNullOrEmpty(this string str) { return str == null ? true : str == string.Empty ? true : str == "" ? true : false; } /// /// 判断字符串是否非空 /// /// 字符串 /// 如果为Null或Empty或空返回False,否则返回True public static bool IsNotNullOrEmpty(this string str) => !str.IsNullOrEmpty(); } }