|
gablea on 09/06/11 - 15:51:27
hi all
how do I repalce a given number of chrs in a string with *'s? example card :1234567890123456789 I want to display / print card :12345678*********** 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! Good luck!
Cyperium on 09/16/11 - 11:23:13
You would use MID$ like this (following your example):
position = 9 card$ = "1234567890123456789" MID$(card$,position) = "***********" PRINT card$ 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).
Cyperium on 10/24/11 - 14:44:28
Reply 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.
|
|