>>lcString =`'ABCD' >>?'A'$lcString >>?'a'$lcString >>?at('A',lcString) >>?at('a',lcString) >>>>for CR,LF etc you can use CHR() or the 0h Syntax
>>lcCHR = CHR(13)
>>lcCHR2=0h0D
>>?lcCHR=lcCHR2
>>
>>CLEAR #DEFINE dcCRLF 0h0D0A #DEFINE dcCR 0h0D #DEFINE dcLF 0h0A lcFile = "Your File Name" lcData = ALLTRIM(FILETOSTR(lcFile)) *We do not have an idea what file type we have *lets figure it out *if the line breaks are mixed, not with this programm *this would need some more things (or a loop, but this is boring) DO CASE CASE dcCRLF$lcData * this is a CRLF File lcLineBreak = dcCRLF CASE dcCR$lcData * this is a LF File lcLineBreak = dcCRLF CASE dcLF$lcData * this is a LF File lcLineBreak = dcCRLF OTHERWISE *no idea, do nothing lcLineBreak = .NULL. ENDCASE *to format all files with CRLF replace .f. with .t. IF .F. THEN lcLineBrkNew = dcCRLF ELSE &&.F. lcLineBrkNew = lcLineBreak ENDIF &&.F. IF !ISNULL(lcLineBreak) THEN *we found something, lets do lcData = STRTRAN(lcData,lcLineBreak,lcLineBrkNew+' ') ENDIF &&!ISNULL(lcLineBreak) ?lcData