问题
I have a String like this:
Info1|Info2
I want this String to be splitted by | and a it should return the second Info and the first one. So I want one msgbox displaying Info1 and another one displaying Info2. How can I do this? I already tried
StringSplit
But without any success...
回答1:
Try this :
#Region ;************ Includes ************
#Include <Array.au3>
#EndRegion ;************ Includes ************
$str = 'Info1|Info2'
$array = StringSplit($str, '|', 2)
For $i = 0 To UBound($array) - 1
MsgBox(64, $i, $array[$i], 1)
Next
_ArrayDisplay($array) ; example
来源:https://stackoverflow.com/questions/19661998/autoit-split-string