StrCheck Function:
Checks a string for a specified length.
Description:
The StrCheck function checks a string for a specified length. There are two required arguments, Input and Length. Input is the string to check. Length is the required size of the string. StrCheck returns True if the string is the specified length or False if it does not. StrCheck will return null if the input string is null.
Syntax:
boolean = StrCheck(input, length)
Example:
<%
'--- String must be 7 characters long - Returns False Response.Write StrCheck("Livio Siri", 7)
'--- string must be 5 characters long - Returns True Response.Write StrCheck("Livio", 5)
%>
ASP Source Code:
<%
Private Function StrCheck(byVal Input, byVal length) Dim a if IsNull(Input) Then StrCheck = Null Exit Function Else a = Len(Input) If CLng(a) = CLng(length) Then StrCheck = True Else StrCheck = False End If End If End Function
%>
|