Plateforme Level Extreme
Abonnement
Profil corporatif
Produits & Services
Support
Légal
English
Replace 1 to the position of the charactor
Message
De
02/10/2002 06:07:51
 
 
À
02/10/2002 03:38:56
Information générale
Forum:
Visual FoxPro
Catégorie:
Codage, syntaxe et commandes
Divers
Thread ID:
00706731
Message ID:
00706755
Vues:
19
>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
Précédent
Répondre
Fil
Voir

Click here to load this message in the networking platform