123 Eng

Engineering the engineers™


Latest Jobs   Forum Map

 


Home

Source Codes

Engineering Colleges

BE Students

Training  Reports (updated)

Seminar Reports (updated

Placement Papers (updated)

Forums

   Computer Science / IT

   Electronics

   Electrical

   Mechanical

   Chemical

   Civil

   CAT / MBA

   GMAT / Foreign MBA

Latest Jobs

Engineering Jobs / Technical Jobs

Management Jobs

Sitemap

About-Us

Terms of use

Displaying  Source Code(s)  
 

 
cutOff

--------------------------------------------------------------------------------

Description : This function allows you to control the length of a string. The function adds "..." to the end of an adjusted string to indicate that it has been truncated.


<%
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
%>
 

 

Contribute content or training reports / feedback / Comments
job placement papers
All rights reserved copyright 123ENG