Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
String manipulation
Message
 
General information
Forum:
Visual FoxPro
Category:
Other
Miscellaneous
Thread ID:
00359517
Message ID:
00359531
Views:
11
>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
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform