You cannot select more than 25 topics Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.

24 lines
641 B
Plaintext

<%
function cutOff(chkString,sNum)
'Is the string empty?
if IsNull(chKString) = False And chkString > sNum Then
strTot = Len(chkString)
'Eliminate blank spaces off the end, nee
' ded for SQL 6.5
While Right(chkString, 1) = " "
chkString = Left(chkString, strTot - 1)
strTot = Len(chkString)
Wend
'Cut it down
chkString = Left(chkString, sNum)
'One last check for blank spaces
if Right(chkString, 1) = " " Then
chkString = Left(chkString, sNum - 1)
End if
'Indicate truncation
if Len(chkString) <> strTot Then chkString = chkString & "..."
'Return string
cutOff = chkString
End if
End function
%>