working with strings (Explode)

Collapse
X
 
  • Time
  • Show
Clear All
new posts
  • bnashenas1984
    Contributor
    • Sep 2007
    • 257

    working with strings (Explode)

    Hi everyone
    I'm looking for a function to cut strings in actionscript 3
    there is a function in PHP which cuts strings using a second string.

    Here is the example :
    If you explode this string in PHP : "my - name - is - David" by the charecter which seprates them "-" the result will be an Array

    1. my
    2. name
    3. is
    4. David

    Is there a way to do it in AS3
    Any suggestions will be helpfull

    Thanks
  • bnashenas1984
    Contributor
    • Sep 2007
    • 257

    #2
    Finally I found the command.
    I'm posting it for those who might have the same problem

    ArrayName = StringName.spli t("Spliter");


    ArrayName will be the array you want to put splited string into.
    StringName is the string you want to split.
    and Spliter is the character you want to split the string with

    Comment

    Working...