Jump to content

Recommended Posts

Posted

probly a dumb question.. how do i split a string into all the seperate parts? for example, i want to split "the word" into an array (length, "t", "h", "e", " ", "w", "o", "r", "d")

Posted (edited)

$phrase = "the word"
$length = StringLen($phrase)
If $length = 0 Then Exit

Dim $array[$length]

For $i = 0 TO $length - 1
    $array[$i] = StringMid($phrase, $i + 1, 1)
Next

For $i = 0 To $length -1
    MsgBox(4096, "", $array[$i])
Next

Edited by Valik

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
  • Recently Browsing   0 members

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