Convert string to lowercase then compare
package{
import flash.display.Sprite;
public class Main extends Sprite{
public function Main(){
var example:String = "Cool. This is a cool as both cool (lowercase) and Cool.";
var search:String = "cool";
trace( example.toLowerCase( ).indexOf( search ) );
}
}
}
Related examples in the same category