Join

The -join operator joins arrays using a string. In the following example, the string is split based on a comma, and then joined based on a tab (`t):

PS> "a,b,c,d" -split ',' -join "`t"
a b c d

The join operator may also be used in front of an array, when there is no need for a separator, for example:

PS> -join ('h', 'e', 'l', 'l', 'o', ' ', 'w', 'o', 'r', 'l', 'd')
hello world

If the parentheses are excluded from the example, the join operation will be confined to the first element of the array, the first h character.

..................Content has been hidden....................

You can't read the all page of ebook, please click here login for view all page.
Reset
3.134.111.124