It was overwritten, as you specified.This one behaves rather oddly:
What happened to the rest of the string?Code:
v:\> echo %@subst[3,%%@char,foobar] foo^
Charles Dye's SafeChars plugin makes it really easy:>I want a single character to be replaced by a '^'. How? This didn't work:
> v:\> echo %@subst[2,^^,foobar]
WAD.Using "xy" as the replacement string has similar result - 2 consecutive characters are replaced with "xy".
It's appended to the end of the string. But the user bears some responsibility to not pass garbage!Based on the above result, I'd like a more explicit explanation of "boundary conditions" (i.e., when position n is not part of the string).
It never does -- Vincent wasn't replacing a single character, he was overwriting the string with the literal string "%@char" -- NOT the result of the @char.And I still do not see why replacing a single character in the string with the caret ^ truncates the string?