Sign in to follow this  
Followers 0
Lemures

Stringsplit

2 posts in this topic

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")

Share this post


Link to post
Share on other sites



#2 ·  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

Share this post


Link to post
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
Sign in to follow this  
Followers 0