Finding Substrings : IndexOf lastIndexOf : String Flash / Flex / ActionScript examples


Flash / Flex / ActionScript examples » String » IndexOf lastIndexOf »

 

Finding Substrings


 

package{
  import flash.display.Sprite;
  
  public class Main extends Sprite{
    public function Main(){

        var sTitle:String = new String("ActionScript");
        trace(sTitle.indexOf("ActionScript"))
        trace(sTitle.indexOf("i"));  
        trace(sTitle.lastIndexOf("i"));  
        trace(sTitle.indexOf("i"4));  
        trace(sTitle.lastIndexOf("i"12));  
        trace(sTitle.indexOf("q"));  
        trace(sTitle.lastIndexOf("g"));  
        

    }
  }
}
0
3
9
9
9
-1
-1

        



Leave a Comment / Note


 
Verification is used to prevent unwanted posts (spam). .


Flash / Flex / ActionScript examples

 Navioo String
» IndexOf lastIndexOf