using System.Text.RegularExpressions;
namespace DeviceRepairAndOptimization.Utils
{
public static class StringExtended
{
///
/// 判断字符串是否为空
///
///
///
public static bool IsNullOrWhiteSpace(this string Value)
{
if (!string.IsNullOrWhiteSpace(Value))
return false;
return true;
}
///
/// 判断字符串是否为整数型
///
///
///
public static bool IsInt(this string Value)
{
int intValue = 0;
if (!string.IsNullOrWhiteSpace(Value))
return false;
return int.TryParse(Value, out intValue);
}
}
}