Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Removing break lines from a .txt file
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01197525
Message ID:
01197556
Vues:
14
>Thank you but it's not removing the line break
>
>I am not sure whether its a line break or enter
>
>Please take a look at the file
>
>http://www.acrisoft.bizland.com/source.txt
>
>It's comma delimeted
>It has a comma in the final of every line
>But in the last line there´s not a comma,
>maybe the customer typed "enter"


Moises, that file has no CR (CHR(13)) in it, it contains only LF (CHR(10)). That is why STRTRAN() doesn't work
If you want to remove it try with CHRTRAN():
Text1 = FILETOSTR("details.csv")
CHRTRAN(text1, CHR(13)+CHR(10), [  ])
STRTOFILE(text1, "details.csv")
But this is a dangerous because CHRTRAN() will convert ANY CHR(13) to empty string and ANY CHR(10) to empty string no matter where they are positioned.
Against Stupidity the Gods themselves Contend in Vain - Johann Christoph Friedrich von Schiller
The only thing normal about database guys is their tables.
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform