/ Published in: ASP
- 'Our function Shorten can accept 2 parameters
- 'The string and the length of characters to shorten the string too
- Function Shorten(sString, sLength)
- 'Make sure length of the string is more than the number of characters to return
- If Len (sString) > sLength Then
- 'Add four full stops so that the visitor knows the string has been abbreviated
- Shorten = Left(sString,sLength) & "..."
- 'If the string is shorter than the number of characters allowed then don't shorten
- Shorten = sString
- End If
- End Function
You need to login to post a comment.