Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Matching parts of two Strings
Message
From
16/09/2002 17:10:46
Antonio Lopes (Online)
BookMARC
Coimbra, Portugal
 
 
To
16/09/2002 17:00:18
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00700976
Message ID:
00700981
Views:
18
>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
Previous
Reply
Map
View

Click here to load this message in the networking platform