Sign in to follow this  
Followers 0
agubler

Loop through string value

3 posts in this topic

hi all

need a bit of help!! really would like a neat function to loop through a string and retrieve values seperated by a value (i.e. comma)

example string "one,two,three,four,five,six,seven,eight,nine,ten"

Would like the results to be return something like this

one

two

three

four

five

six

seven

eight

nine

ten

Many Thanks in advance! :P

Share this post


Link to post
Share on other sites



$a = StringSplit("one,two,three",",")
FOR $i = 1 TO $a[0]
    ConsoleWrite($a[$i] & @LF) 
NEXT

Share this post


Link to post
Share on other sites

$a = StringSplit("one,two,three",",")
FOR $i = 1 TO $a[0]
    ConsoleWrite($a[$i] & @LF) 
NEXT
god i'm embarrassed it was that easy, was having a mental block! thanks alot for the quick reply :P

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