REM
REM Contributed by James C. Fuller - April 2009.
REM
REM' LTRIM
REM' multiple entries in Match$ are treated individually
FUNCTION LTrim(STRING Main$,STRING Match$)
LOCAL mlen,mtlen,i,j TYPE int
i = 0
j = 0
mlen = LEN(Main$)
mtlen = LEN(Match$)
IF (mlen EQ 0) | (mtlen EQ 0) THEN
RETURN Main$
END IF
FOR i = 1 TO mlen
IF INSTR(Match$,MID$(Main$,i,1),1) EQ 0 THEN
RETURN RIGHT$(Main$,mlen-j)
ELSE
j = j + 1
END IF
NEXT
RETURN Main$
END FUNCTION
REM' Test
REM' PRINT LTrim(" James Fuller",CONCAT$(" ",CHR$(9)))