Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Filter text string
Message
 
 
À
07/04/2003 08:28:28
Information générale
Forum:
Visual FoxPro
Catégorie:
Client/serveur
Divers
Thread ID:
00774644
Message ID:
00774667
Vues:
18
This message has been marked as a message which has helped to the initial question of the thread.
Hi Russel,

You can use ALINES() function to split string into items and than process array created by it.
LOCAL laList[1], lcTestString
lcTestString = 'test;test;test1;test;test1;test2'
lcNewString = ";"
FOR i =1 TO ALINES(laList,lcTestString, .T., ";")
	IF NOT ( ";" + PROPER(laList[i]) + ";" $ lcNewString )
		lcNewString = lcNewString + PROPER(laList[i]) + ";"
	ENDIF
ENDFOR

lcNewString = SUBSTR(lcNewString , 2, LEN(lcNewString) -2)
>I have a text string as follows:
>
>lcTestString = 'test;test;test1;test;test1;test2'
>
>What I would like is the following string:
>
>lcNewString = 'Test,Test1,and Test2'
>
>What is the best way to do this?
>
>Thank in advance for help,
>Russell
--sb--
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform