将字符串拆分为单独的变量 [英] Splitting a string into separate variables
本文介绍了将字符串拆分为单独的变量的处理方法,对大家解决问题具有一定的参考价值,需要的朋友们下面随着小编来一起学习吧!
问题描述
我有一个字符串,我使用代码 $CreateDT.Split(" ")
将其拆分.我现在想以不同的方式操作两个单独的字符串.如何将它们分成两个变量?
I have a string, which I have split using the code $CreateDT.Split(" ")
. I now want to manipulate two separate strings in different ways. How can I separate these into two variables?
推荐答案
喜欢这个吗?
$string = 'FirstPart SecondPart'
$a,$b = $string.split(' ')
$a
$b
这篇关于将字符串拆分为单独的变量的文章就介绍到这了,希望我们推荐的答案对大家有所帮助,也希望大家多多支持IT屋!
查看全文