powershell concat string
Substitution
Because the expanding string can become difficult to read, I often like to use substitution values and the format specifier. To do this, I create a string and parameters for place holders. My separator goes inside the string. Then I use the –f format operator and specify the values for {0} and {1}. This is shown here:
PS C:> "{0}, {1}" -f $s,$t
This is a string, a really cool string
需要注意,参数是需要逗号分隔的