Level Extreme platform
Subscription
Corporate profile
Products & Services
Support
Legal
Français
Replace 1 to the position of the charactor
Message
From
02/10/2002 06:07:51
 
 
To
02/10/2002 03:38:56
General information
Forum:
Visual FoxPro
Category:
Coding, syntax & commands
Miscellaneous
Thread ID:
00706731
Message ID:
00706755
Views:
18
>I have preset char for the text such as cText = '0000000000'
>
>if I want to replace cText with 1 to the position 4 eg. '0001000000' and the second number come in is the 9, so my cText with become '0001000010', any one can help to code this.
>
>
>Sorry for english, Thanks

Carmen,
cText = '0000000000'
cText = stuff(cText, 4, 1, '1')
cText = stuff(cText, 9, 1, '1')
?cText
or more complex
cText = '0000000000'
cText = stuff(stuff(cText, 4, 1, '1'), 9, 1, '1')
?cText
Gregory
Previous
Reply
Map
View

Click here to load this message in the networking platform