Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Indent a long string into a txt file
Message
De
02/05/2022 11:34:44
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01684311
Message ID:
01684321
Vues:
41
>>>>Hi,
>>>>
>>>>The code writes a long string (it could be up to 200 or more characters) into a .txt file. The string is written to the .txt file using strtofile() function. I would like the long string to be indented by, say 10 characters. I can indent the first line, by adding a space(10). But the rest of the string go to the 1st column,
>>>>Is there a way to do it, other than parsing the string into 60-70 characters and adding a space(10) before each line?
>>>>
>>>>TIA
>>>
>>>Sorry for a newbie question. I think VFP has a function that will populate an array from a long string, setting the max number of characters in each element. If my memory services me right, what is this function?
>>>Basically I want the VFP to parse the string into smaller strings, each one no more than 60 char in length.
>>>TIA
>>
>>AFAIK there's no such function.
>
>I suppose since I didn't remember this function, my memory works :)

Right. 😂

Btw., if you don't succeed using my previous advice, feel free to send me an email with some typical data. Should be easy enough, and a fun challenge. The data doesn't have to be "real" data, only "realistic".
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform