Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Treating lines in a string
Message
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00807738
Message ID:
00807792
Vues:
20
I set up as below

But the problem it's replacing all lines
Even the lines that does not contain "http://www"



lcStr = FILETOSTR("header3.htm")

DIMENSION laLines[1]
ALINES(laLines, lcStr)
lcNewTextFile = "header3b.htm"
lcCrLf = CHR(13) + CHR(10)
ERASE (lcNewTextFile)
FOR i=1 TO ALEN(laLines)
if not empty(laLines[i]) && skip blank lines
IF ("http://www" $ laLines[i])
STRTOFILE(' '+ lcCrLf, lcNewTextFile, .T.)
endif
endif

ENDFOR
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform