CS4 string case convertion and comparision of two strings with action script

Posted by druva | Flash, as3, utils | Saturday 20 December 2008 9:35 am

This code show how to convert string case to upper and to lower.
And also shows how to compare two strings and returns index value.


var site:String = "http://blog.totusinfo.com";

var siteUp:String = site.toUpperCase();
var siteLow:String = site.toLowerCase();

trace(siteUp.indexOf('totus'));
trace(siteLow.indexOf('totus'));