Erik,
There are performance problems with long strings and chrtran() where the second and third arguments are not the same length. It would work faster if you used CHRTRAN(lcString, CHR(13)+CHR(10),SPACE(2)) even though it might cause more strtrans to run.
>>>Before I wrote my code, I test reduce(). It didn`t strip CHR(13), only CHR(10)
>>
>>Like I said, Vbscript.RegExp covers the issue just fine.
>
>How about another, pure VFP solution, in just as many lines of code?
>
>* Converts all carriage returns and line feeds to spaces
>lcString = CHRTRAN(lcString, CHR(13)+CHR(10),SPACE(1))
>* Reduce all strings of spaces to a single space
>DO WHILE SPACE(2)$lcString]
> lcString = STRTRAN(lcString, SPACE(2), SPACE(1))
>ENDDO
>