Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Let's see
Message
From
30/03/2021 12:39:45
 
 
To
30/03/2021 07:21:44
Dragan Nedeljkovich (Online)
Now officially retired
Zrenjanin, Serbia
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Title:
Miscellaneous
Thread ID:
01679334
Message ID:
01679362
Views:
56
>>>
lcString="ABC,DEF,GHI,JKL"
>>>lcString2=""
>>>x=0
>>>do while x<len(m.lcString)
>>>  x=m.x+1
>>>  IF SUBSTR(m.lcString,m.x,1)<>","
>>>    lcString2=m.lcString2+substr(m.lcString,m.x,1)
>>>  ENDIF
>>>enddo X
>>>?m.lcString2
>>
>>Why not just:
>>
>>
>>lcString="ABC,DEF,GHI,JKL"
>>lcString2 = STRTRAN(m.lcString, ',', '')
>>?lcString2
>>
>
>Why use STRTRAN to do the job of CHRTRAN?

Because I can remember in my head how STRTRAN() works, but not how CHRTRAN() works. ;-)

Tamar
Previous
Reply
Map
View

Click here to load this message in the networking platform