Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
How do I split strings with | in them?
Message
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00214427
Message ID:
00214490
Vues:
20
Hi Erik!

>>Meel, dhr. H.J. van|Posthumus, dhr. B.J.

>OriginalString = "Meel, dhr. H.J. van|Posthumus, dhr. B.J."
>LeftPortion = LEFT(x, ATC("|", x)-1)
>RightPortion = SUBSTR(x, ATC("|", x)+1)

Thanks alot for the answer! It works (didn't know the ATC() command :-))!! But. With textstrings which have the | in them it works fine. In my table it doesn't seem to work. I seems to be a RETURN code or something. Because if I type ?table.fieldname in the commandprompt it will show:

Meel, dhr. H.J. van
Posthumus, dhr. B.J.

Instead of the | sign. Because if I make a variable like:

OriginalString = "Meel, dhr. H.J. van|Posthumus, dhr. B.J."

And then ?Originalstring then I get a nice print of:

Meel, dhr. H.J. van|Posthumus, dhr. B.J.

So in other words I need to specify the return sign somehow. In C it's /n but what is it in FoxPro?

Thanks!
---
Greetings,

Michiel Willems
Willems Advies & Automatisering

E-Mail: willems@automatisering.nu
Website: www.automatisering.nu
ICQ: 10430590
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform