Code: Select all
MidString(String.s, Start.l, Length.l, NewString.s)
Code: Select all
MidString(String.s, Start.l, Length.l) = NewString
Code: Select all
OrigString.s = "1234567890"
NewString.s = "HELLO"
MidString(OrigString, 4, NewString, 4)
Debug MidString
I know this can be done with PokeS(), but that puts the '0' byte at the end of the poked string, which causes the original string to end there. Right now, I use my own function which saves and restores the byte at the end of the poked string, but a native function would be cleaner.
Maybe just a slightly different PokeS() function which doesn't poke the '0' byte...