<html dir="LTR">
<head>
<meta http-equiv="Content-Type" content="text/html; charset=utf-8" />
<meta name="vs_targetSchema" content="http://schemas.microsoft.com/intellisense/ie5" />
<title>SmartStringExtension 成员</title>
<xml>
</xml>
<link rel="stylesheet" type="text/css" href="MSDN.css" />
</head>
<body id="bodyID" class="dtBODY">
<div id="nsbanner"><div style='font-size:10px;color:Green;background-color:#CCCCCC;height:30px;'><b>框架:SmartKernel.Framework | 网站:http://www.smartkernel.com | 邮箱:
[email protected] | 作者:smartkernel</b></div></div>
<div id="nstext">
<p>
<a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.html">SmartStringExtension 概述</a>
</p>
<h4 class="dtH4">Public Static Methods</h4>
<div class="tablediv">
<table class="dtTABLE" cellspacing="0">
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsMatch.html">IsMatch</a></td><td width="50%"> 正则表达式验证方法 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsDouble.html">IsDouble</a></td><td width="50%"> 验证是不是数字:25,1.23,-10等都是合法的数字 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsEmail.html">IsEmail</a></td><td width="50%"> 验证是不是邮箱地址 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsPositive.html">IsPositive</a></td><td width="50%"> 验证是不是正整数:大于等于0的整数(0.0,2.0,+32.0也判断为整数) </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsInteger.html">IsInteger</a></td><td width="50%"> 验证是不是整数:可以为正也可以为负(0.0,2.0,+32.0,-123.00000也判断为整数) </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsChinese.html">IsChinese</a></td><td width="50%"> 验证是不是中文字符 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsLetter.html">IsLetter</a></td><td width="50%"> 验证是不是字母 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsLetterNumber.html">IsLetterNumber</a></td><td width="50%"> 验证是不是字母和数字组合 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsNumber.html">IsNumber</a></td><td width="50%"> 验证是不是纯数字组合 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsMobilePhone.html">IsMobilePhone</a></td><td width="50%"> 验证是不是手机号码 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsLengthInScope.html">IsLengthInScope</a></td><td width="50%"> 验证长度是不是在指定的范围内 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsLength.html">IsLength</a></td><td width="50%"> 验证长度是不是指定的长度 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsDecimalDigitsInScope.html">IsDecimalDigitsInScope</a></td><td width="50%"> 验证小数位数是不是在指定的范围内 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsDecimalDigits.html">IsDecimalDigits</a></td><td width="50%"> 验证小数位数是不是指定的长度 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsLetterNumberUnderline.html">IsLetterNumberUnderline</a></td><td width="50%"> 验证是不是字符、数字或者下划线 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsUrl.html">IsUrl</a></td><td width="50%"> 验证是不是Url地址。注意,必须有http等协议开头的前缀,www.caoyanbai.com是不能验证通过的 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsDateTime.html">IsDateTime</a></td><td width="50%"> 验证是不是日期格式。注意,20080123这样的格式是不能验证的,必须是2008-01-23或2008年01月23 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsDateTimeInScope.html">IsDateTimeInScope</a></td><td width="50%"> 验证日期是不是在指定的范围内 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsPhone.html">IsPhone</a></td><td width="50%"> 验证是不是电话号码,匹配010-1234567、010-12345678、0316-1234567、0316-12345678、1234567、12345678。 以及所有前面的号码加“-”、“转”、“#”之后加分机号码。 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsZipCode.html">IsZipCode</a></td><td width="50%"> 验证是不是邮编 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.IsIPAddress.html">IsIPAddress</a></td><td width="50%"> 验证是不是IP地址 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.Left.html">Left</a></td><td width="50%"> 截取左边指定长度的字符 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.Right.html">Right</a></td><td width="50%"> 截取右边指定长度的字符 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.GetTrueLength.html">GetTrueLength</a></td><td width="50%"> 计算字符串的长度,一个中文算两个字符 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.Reverse.html">Reverse</a></td><td width="50%"> 翻转字符串 </td></tr>
<tr VALIGN="top"><td width="50%"><img src="pubmethod.gif"></img><img src="static.gif" /><a href="SmartKernel.Framework.Core.Extensions.SmartStringExtension.ToString_overload_1.html">T