0

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...

Madara Uchiha
  • 127
  • 2
  • 11

1 Answers1

2

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
Xenobiologist
  • 2,091
  • 1
  • 12
  • 16