Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Help on FileToStr() and ChrTran() functions
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00505649
Message ID:
00505947
Vues:
21
>>Mark,
>>
>>This is not true for big files. Check the FAQ section, I made a reference to the thread, where this problem was discussed in details.
>
>I just downloaded War and Peace which is a 3.2MB text file. I did the following and got no errors and the file remained intact and did it all in 0.6 seconds:
>lcString = filetostr(x)
>lcString = strtran(lcString, 'was', 'Z~Z')
>? strtofile(lcString, x)  && returned 3,271,930 [bytes]
>Resistance is futile. Feel the power of VFP string handling capabilities. I do cede the point that this is CASE SENSITIVE so other alternatives have to be used where string functions have to be performed regardless of case.

Mark,

I mean compare one-line string operation time with 3 lines operation time. Do it in a loop. You'll see the difference. One-line works faster. I made these tests, while we're discussing this problem and my conclusion was that one-line is faster. This is all I intended to say. Check the thread, mentioned in a FAQ, you'll see this discussion.
If it's not broken, fix it until it is.


My Blog
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform