CutLeft

Cuts the left part respecting words, without cutting words

CodeFunctionName
What is this?

Public

Tested

Original Work
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

InText,TLen

Views 4,532

Downloads 1,306

CodeID
DB ID

ANmarAmdeen
608
Revisions

v2.0

Monday
February
3
2020