>>>FUNCTION NoCr(tcString)
>>>tcString = ALLTRIM(tcString)
>>>DO WHILE RIGHT(tcString,1) = CHR(13) AND !EMPTY(tcString)
>>> tcString = SUBSTR(tcString,1,LEN(tcString)-1)
>>>ENDDO
>>>RETURN tcString
>>
>>Thanks. I changed a few things.
>>
>>FUNCTION NoCr(tcString)
>>tcString=ALLTRIM(tcString)
>>DO WHILE INLIST(RIGHT(tcString,1),CHR(13),CHR(10),CHR(160)) AND NOT EMPTY(tcString)
>> tcString=ALLTRIM(SUBSTR(tcString,1,LEN(tcString)-1))
>>ENDDO
>>RETURN tcString
>mike,
>
>id say that chris deserves the VP award (your improvements were not specified in original requirements)! good one chris! elegant even!
Lucien,
Thanks for the kind words.
I am suprised, however, that no one BUSTED ME on the
fact that you don't really have to check for an
EMPTY() string in the DO WHILE!
Chris
Chris