---- Original Message ----
Sent: Sunday, 2011. February 27. 09:39
Subject: RE: [Support-t-2635] Re: @SUBST ... how replace character with
| Originally Posted by vefatica
| This one behaves rather oddly:
| v:\> echo %@subst[3,%%@char,foobar]
| foo^What happened to the rest of the string?
| It was overwritten, as you specified.
| @SUBST is an overwrite, not an insertion. What you passed to @SUBST
| was "3,%@char,foobar". So this translates to :
| Write the string "%@char" to the string "foobar", starting at
| position 3. The result is foo%@char.
@SUBST[n, string1, string2]: Substitutes string1 starting at position n in string2.
F:\JPSOFT>*for /l %n in (0,1,9) echo %n %@subst[%n,x,0123456]
Using "xy" as the replacement string has similar result - 2 consecutive characters are replaced with "xy". 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). And I still do not see why replacing a single character in the string with the caret ^ truncates the string?