Jump to content

split strings


Recommended Posts

What do you think about my code :

#include <String.au3>

GLobal $id, $size, $name, $result

$string = "SXBP22 Wii fit PAL 1.75G" & @CR & "SXAP52 Guitar Hero: World Tour 3.95G" & @CR & "SXBE52 Guitar Hero Metallica 4.13G"
$aReturn = StringSplit ($string, @CR, 0)

;choose line 1
_Line(1)

MsgBox(0,"Line 1 - Game ID",$id)

;choose line 2
_Line(2)

MsgBox(0,"Line 2 - Game Size",$size)

;choose line 3
_Line(3)

MsgBox(0,"Line 3 - Game ID",$name[0])

Func _Line($nb)
    For $i = 1 to $aReturn[0]
        $id = StringLeft($aReturn[$nb], 6)
        $size = StringRight($aReturn[$nb], 5)
        $name = _StringBetween ($aReturn[$nb], $id, $size)
    Next
EndFunc
Edited by sambalec
Link to comment
Share on other sites

Don't know if this is the place or start new thread. I have the stringsplit with no problems. But I downloaded the Array2D UDF that contains _StringSplit. The include folder and cannot find on autoit site the UDF with _StringSplit. Can anybody help or correct. thanks.

Dr SherlockAlways a way

Link to comment
Share on other sites

Create an account or sign in to comment

You need to be a member in order to leave a comment

Create an account

Sign up for a new account in our community. It's easy!

Register a new account

Sign in

Already have an account? Sign in here.

Sign In Now
 Share

  • Recently Browsing   0 members

    • No registered users viewing this page.
×
×
  • Create New...