Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
String manipulation
Message
 
 
Information générale
Forum:
Visual FoxPro
Catégorie:
Autre
Divers
Thread ID:
00359517
Message ID:
00359531
Vues:
12
>Hi everybody,
>
>I understand, that this question should have a simple answer, but I stuck :( Could somebody help me?
>
>The problem is:
>
>I have a string, say,
>myString='Nadya, are you totally lost??!!! : <>>>>>'
>
>I have several symbols, like:
>symbols=[:;./\<>+=-}]()#*]
>
>I want to surround these symbols with space(1)+symbol+space(1), for each occurance of these symbols in my string.
>
>How can I do that?
Try the following:
for lxx = 1 to len(symbols)
   myString = strtran(myString,substr(symbols,lxx,1),space(1)+substr(symbols,lxx,1)+space(1))
endfor
I haven't tested this so you may need to work with it a bit.
Larry Miller
MCSD
LWMiller3@verizon.net

Accumulate learning by study, understand what you learn by questioning. -- Mingjiao
Précédent
Suivant
Répondre
Fil
Voir

Click here to load this message in the networking platform