Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Let's see
Message
From
30/03/2021 15:10:43
John Ryan
Captain-Cooker Appreciation Society
Taumata Whakatangi ..., New Zealand
 
 
To
29/03/2021 17:29:08
Mike Yearwood
Toronto, Ontario, Canada
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01679334
Message ID:
01679367
Views:
87
Apart from prior chrtran() and strtran() offerings... you might avoid the duplicate substr():
lcString="ABC,DEF,GHI,JKL"
lcString2=""
x=0
do while x<len(m.lcString)
  x=m.x+1
lcString3=SUBSTR(m.lcString,m.x,1)
  IF m.lcString3<>","
    lcString2=m.lcString2+m.lcString3
  ENDIF
enddo X
?m.lcString2
For enjoyers of left field:
lcString="ABC,DEF,GHI,JKL"
lcString2=""
licount=getwordcount(m.lcString,",")
for x=1 to m.liCount
   lcString2=m.lcString2+getwordnum(m.lcString,m.x,",")
endfor
?m.lcString2
And then there's always strextract()...
"... They ne'er cared for us
yet: suffer us to famish, and their store-houses
crammed with grain; make edicts for usury, to
support usurers; repeal daily any wholesome act
established against the rich, and provide more
piercing statutes daily, to chain up and restrain
the poor. If the wars eat us not up, they will; and
there's all the love they bear us.
"
-- Shakespeare: Coriolanus, Act 1, scene 1
Previous
Next
Reply
Map
View

Click here to load this message in the networking platform