It would be nifty if $puttok would work like $replace, meaning you wouldnt have to do this
$puttok($puttok($puttok($puttok(a.s.d.f,1,1,46),2,2,46),3,3,46),4,4,46)
but just this
$puttok(a.s.d.f,1,1,46,2,2,46,3,3,46,4,4,46)
While not unusable, would there be a great demand to use this?
While your preposed example does actually cover something this does not you could use $puttok($deltok(a.s.d.f,2-4,46),1.2.3.4,1,46)
I do like how u allowed for different token seperators on each token and its replacement, If this came about I would expect a $puttokx to take effect only on the original string (although that might be a bit harder than i first thought about)
I would rather just see $puttok be able to uses ranged tokens such as $puttok(a.s.d.f,1.2.3.4,1-4,46) the string 1.2.3.4 is inserted to replace tokens 1 to 4, and just happens to be 4 tokens in this case.
$tokmatch would work just like $ifmatch ($v1,$v2), but it would be for tokens. Example:
$puttok(1.2.3.4,$gettok($tokmatch,4,46),1,46)
I dont understand what you expect $tokmatch to hold above ?
var %i = a s d f,%i = $gettok(%i,1,32)
echo -a %i
echo -a $tokmatch
Since $gettok returns a value and you would need to store that value somewhere anyway, I dont see the point of having a $tokmatch value that returns the same thing? Where would there be a need fior this in code? ex?
PS: Im not saying your idea is bad, just i cant see its use being high or needed all that much.