Cuts the left part respecting words, without cutting words
Function CutLeft(InText,TLen)
CutLeft=InText
If InText="" then Exit function
'CutLeft=Replace(CutLeft,chr(13) & Chr(10)," <br/ >")
if len(CutLeft) >TLen then
NewT=left(CutLeft,TLen)
for i=len(NewT)-1 to 1 step -1
if mid(NewT,i,1)=" " then
NewT=Left(CutLeft,i) & "..."
Exit for
end if
next
CutLeft=NewT
'if Ucase(Left(CutLeft,4))=" <BR >" then CutLeft=Mid(CutLeft,5)
end if
End Function
CutLeft=InText
If InText="" then Exit function
'CutLeft=Replace(CutLeft,chr(13) & Chr(10)," <br/ >")
if len(CutLeft) >TLen then
NewT=left(CutLeft,TLen)
for i=len(NewT)-1 to 1 step -1
if mid(NewT,i,1)=" " then
NewT=Left(CutLeft,i) & "..."
Exit for
end if
next
CutLeft=NewT
'if Ucase(Left(CutLeft,4))=" <BR >" then CutLeft=Mid(CutLeft,5)
end if
End Function
InText,TLen
Views 4,545
Downloads 1,310
CodeID
DB ID