Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Matching parts of two Strings
Message
De
16/09/2002 17:10:46
 
 
À
16/09/2002 17:00:18
Steven Dyke
Safran Seats USA
Texas, États-Unis
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00700976
Message ID:
00700981
Vues:
20
>Is there a way to find the same part of two delimeted strings? Example:
>String 1 SDE,MJS,NYE
>String 2 33,45,25
>
>I need to find the second part of both strings because they go together.
LOCAL ARRAY lapart1(1), laPart2(1)

ALINES(m.laPart1,"SDE,MJS,NYE",.T.,",")
ALINES(m.lapart2,"33,45,25",.T.,",")
? m.laPart1[2]
? m.laPart2[2]
in VFP6:
LOCAL ARRAY lapart1(1), laPart2(1)

ALINES(m.laPart1,STRTRAN("SDE,MJS,NYE",",",CHR(13)),.T.)
ALINES(m.lapart2,STRTRAN("33,45,25",",",CHR(13)),.T.)
? m.laPart1[2]
? m.laPart2[2]
----------------------------------
António Tavares Lopes
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform