String substitution

<< Click to Display Table of Contents >>

Navigation:  TCC > Variables & Functions > CMD.EXE Variables >

String substitution

For compatibility with some peculiar syntax introduced in recent CMD versions, TCC supports:

 

%var:string1=string2%

Substitutes the second string for all instances of the first string in the variable.

%var:~x[,y]%

Returns the substring starting at the xth character position (base 0) and continuing for y characters. If y is not specified, returns the remainder of the string. If x is negative, starts from the end of the string.

 

For string manipulations, we suggest you rely instead on the much more flexible Variable Functions.