'''------------------------------------------------------------------------
''' <summary>
''' 文字列長检查(按字节检查)
''' </summary>
''' <param name="argStrControl">文字列</param>
''' <param name="argLength">文字列長</param>
''' <returns>True - , False - </returns>
''' <remarks></remarks>
'''------------------------------------------------------------------------
Public Shared Function CheckControlLength(ByVal argStrControl As String, _
Optional ByVal argLength As Integer = 0) As Boolean
'NULL
If String.IsNullOrEmpty(argStrControl) Then
Return True
End If
'文字列長
Dim iLength As Integer = 0
iLength = pEncoding.GetBytes(argStrControl).Length()
'文字列長检查
If argLength < iLength Then
Return False
End If
Return True
End Function
''' <summary>
''' 文字列長检查(按字节检查)
''' </summary>
''' <param name="argStrControl">文字列</param>
''' <param name="argLength">文字列長</param>
''' <returns>True - , False - </returns>
''' <remarks></remarks>
'''------------------------------------------------------------------------
Public Shared Function CheckControlLength(ByVal argStrControl As String, _
Optional ByVal argLength As Integer = 0) As Boolean
'NULL
If String.IsNullOrEmpty(argStrControl) Then
Return True
End If
'文字列長
Dim iLength As Integer = 0
iLength = pEncoding.GetBytes(argStrControl).Length()
'文字列長检查
If argLength < iLength Then
Return False
End If
Return True
End Function
标签:
asp.net,字节检查,全半角
免责声明:本站文章均来自网站采集或用户投稿,网站不提供任何软件下载或自行开发的软件!
如有用户或公司发现本站内容信息存在侵权行为,请邮件告知! 858582#qq.com
狼山资源网 Copyright www.pvsay.com
暂无“asp.net 按字节检查包含全半角的文字”评论...