Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Reverse comma-delimited string
Message
De
04/09/2019 15:53:13
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., Nouvelle Zélande
 
 
À
04/09/2019 13:44:45
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
01670542
Message ID:
01670578
Vues:
62
>>Right, that matches my experience. ALINES() is linear. GETWORDxxx() is not.

The ALines nflags parameter also allows better control over strings like a,,b,c,d or similar, as frequently seen in comma-delimited inputs:
lcstring="a,,b,c,d"   &&second word is blank
? Getwordnum(m.lcString,2,",")   &&returns b
licnt=ALINES(laString,m.lcstring,1,",")
? lastring(2)   &&returns empty string
? lastring(3)  &&returns b
licnt=ALINES(laString,m.lcstring,5,",")
? lastring(2)  &&returns b
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform