https://blogs.technet.microsoft.com/heyscriptingguy/2014/07/15/keep-your-hands-clean-use-powershell-to-glue-strings-together/

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

需要注意,参数是需要逗号分隔的

最新文章

  1. javascript 中的 let 作用域
  2. 按要求编写Java应用程序。 (1)建立一个名叫Cat的类: 属性:姓名、毛色、年龄 行为:显示姓名、喊叫 (2)编写主类: 创建一个对象猫,姓名为“妮妮”,毛色为“灰色”,年龄为2岁,在屏幕上输 出该对象的毛色和年龄,让该对象调用显示姓名和喊叫两个方法。
  3. 二叉树遍历Java实现
  4. 【caffe】未定义函数或变量caffe_
  5. fireworks将图片变为透明色
  6. ajax 瀑布流实现
  7. HDU 4588 Count The Carries 数学
  8. 如何在eclips下将一段代码抽取为方法Extract Method
  9. hdu4714(树形dp)
  10. 快速构建Windows 8风格应用37-常见发布注意事项
  11. 了解你的被测系统(why?)
  12. yum安装jdk
  13. PAT1113: Integer Set Partition
  14. String类内存空间详解
  15. spring boot和swagger 整合
  16. LightOJ 1030 【概率DP求期望】
  17. 02-python-垃圾回收机制
  18. sql server 日期时间与字符串的转换
  19. 多态设计 zen of python poem 显式而非隐式 延迟赋值
  20. centos 6.5 安装mplayer

热门文章

  1. 数组和String几种方法的需要注意的地方
  2. STM32F407 串口通信实验 视频第27节 个人笔记
  3. zoj 2835 Magic Square(set)
  4. 二分图最大权完美匹配KM算法
  5. PTA 01-复杂度1 最大子列和问题 (20分)
  6. [luoguP2184] 贪婪大陆(树状数组)
  7. bzoj 1702 贪心,前缀和
  8. django学习之- CSRF及中间件
  9. SeaGlass:手工搭建伪基站监控系统
  10. [Javascript] Use JavaScript's for-in Loop on Objects with Prototypes