|
|
#1 |
|
Junior Member
Join Date: Jun 2005
Posts: 21
|
Replace 3th letter in a string
How do I replace the third letter in a string
Example $0 ReadRegStr HKCU "Software\BioDuo" "BioDuo" Now, $0 contains 123456 but should be replace with 123556 123456 is a user entered number so it can be different on each computer so I can't use the Replace function. How can I do this? -BioDuo |
|
|
|
|
|
#2 |
|
Moderator
Join Date: Nov 2002
Location: Surrey, England
Posts: 8,434
|
code: Usage: ${Replace3rdLetter} $R0 "123456" "5" "4" $R0 = 123556 Made this in college without a compiler so it is untested. Also, you said you want the 3th (3rd) character replaced, but your example of 123456 > 123556 replaces the 4th character. The last parameter of ${Replace3rdLetter} specifies the index to replace; replacing it with the value of the 3rd parameter. -Stu Last edited by Afrow UK; 13th December 2005 at 16:32. |
|
|
|
![]() |
|
|||||||
| Thread Tools | Search this Thread |
| Display Modes | |
|
|