Free Trial

Safari Books Online is a digital library providing on-demand subscription access to thousands of learning resources.


  • Create BookmarkCreate Bookmark
  • Create Note or TagCreate Note or Tag
  • DownloadDownload
  • PrintPrint

6.7. String Dissection

Sometimes you may need to pull a smaller string out of a larger one. For example, you might want to find the first eight characters of a string, or maybe you only care about the part of a line after a colon. ActionScript offers three methods for doing this: slice(), substr(), and substring(). All these methods are similar in intent. They vary only in the way they handle their two optional parameters.

slice(startIndex:Number, endIndex:Number):String


  

You are currently reading a PREVIEW of this book.

                                                                                        

Get instant access to over
$1 million worth of books and videos.

  

Start a Free Trial