Web/AppCode/ShopCart/StringUtil.cs
(开头部分) 24KB这里只显示每个文件的开头 60 行。登录后可以解锁完整代码。
using System;
using System.Drawing;
using System.Web;
using System.Web.UI;
using System.Web.UI.WebControls;
using System.Text.RegularExpressions;
using System.IO;
using System.Drawing.Imaging;
using System.Text;
using System.Xml;
public class StringUtil
{
/// <summary>
/// 是否位正确的日期时间格式
/// </summary>
/// <returns>true</returns>
public static bool IsDataformat(string str)
{
if (str == null) return false;
if (str == "") return false;
try
{
System.Convert.ToDateTime(str.Trim());
return true;
}
catch
{
return false;
}
}
public static bool IsInteger(string strIn)
{
if (Regex.IsMatch(strIn, @"^[0-9]+$"))
return true;
return false;
}
/// <summary>
/// 校验输入字串是否是正数(小数或整数)
/// </summary>
public static bool IsPosNumber(string strIn)
{
if (Regex.IsMatch(strIn, @"^[0-9]*\.{0,1}[0-9]+$"))
return true;
return false;
}
/// <summary>
/// 中国公民身份证号码
/// </summary>
/// <returns>true</returns>
public static bool IsPersonIDCard(string str)
{
if (str == null) return false;
后面还有 583 行代码,购买后查看完整代码
24 小时内免费解锁 3 个项目,之后 1 积分/个。 规则说明
AI 解读
登录后可用,每次 10 积分,解读结果公开显示在下面。
还没有人解读过这个文件。
