/// <summary> /// 判断当前时间是否在指定的时间段内 /// </summary> /// <param name="periodStr">指定时间段</param> /// <param name="liePeriod">所处时间段</param> /// <returns></returns> public static bool BetweenPeriod(string periodStr, out string liePeriod) { string[] periodList = StringHelper.SplitString(periodStr, "\n"); return(BetweenPeriod(periodList, out liePeriod)); }
/// <summary> /// 是否是数值(包括整数和小数) /// </summary> public static bool IsNumericRule(string numericRuleStr, string splitChar) { return(IsNumericArray(StringHelper.SplitString(numericRuleStr, splitChar))); }
/// <summary> /// 判断一个ip是否在另一个ip内 /// </summary> /// <param name="sourceIP">检测ip</param> /// <param name="targetIPStr">匹配ip</param> /// <returns></returns> public static bool InIPList(string sourceIP, string targetIPStr) { string[] targetIPList = StringHelper.SplitString(targetIPStr, "\n"); return(InIPList(sourceIP, targetIPList)); }