gablea on 09/06/11 - 15:51:27
how do I repalce a given number of chrs in a string with *'s?
I want to display / print
any advice is welcome
John on 09/06/11 - 21:24:13
Use the function called "MID$".
The parameters are MID$(input string, start position, how many chars do you want to take).
Also you could have a try with "RIGHT$()"
Take a look at the QB Help!
Cyperium on 09/16/11 - 11:23:13
You would use MID$ like this (following your example):
position = 9
card$ = "1234567890123456789"
MID$(card$,position) = "***********"
You don't need to specify the number of characters to replace. It will only replace to the length of the string (or to the length specified, if you specify a length, but no longer than the length of the string).
gablea on 09/17/11 - 11:17:25
That worked perfectly Thanks Cyperium :D
Cyperium on 10/24/11 - 14:44:28Reply to this message
You're welcome, admittedly John already showed you which function to use, but I felt that you might have been confused as to how you would use it. I don't have internet at home right now so I might be slow on responding.