How do I replace a character in a line?
The character to replace is always in column 27
replace character in line
Moderators: JRL, Dorian (MJT support)
replace character in line
can you give me an example using MidStr?
- I am new at this stuff
- I am new at this stuff
If you always want to replace character 27 with A:
//extract chars 1 to 26
MidStr>line,1,26,firstbit
//extract chars 28 onwards
Length>line,L
MidStr>line,28,L,lastbit
//Put them together with replaced character:
Let>newline=%firstbit%A%lastbit%
If you just want to replace all occurences of a character in a string use the StringReplace function.
//extract chars 1 to 26
MidStr>line,1,26,firstbit
//extract chars 28 onwards
Length>line,L
MidStr>line,28,L,lastbit
//Put them together with replaced character:
Let>newline=%firstbit%A%lastbit%
If you just want to replace all occurences of a character in a string use the StringReplace function.
MJT Net Support
[email protected]
[email protected]