For example, when working with arrays there are methods like indexOf() that works like this:
if (array.indexOf("something")!=-1) { // do something or nothing }
Why hasn't someone made a contains method?
if (array.contains("something")) { // do something or nothing }
Or add functions people find useful like:
var fileHeader:int = byteArray.indexOf([0xFF, 0x00]);
Or with strings or regular expressions:
if (String(myString).contains("fox")) { // do something or nothing }
In the E4X XML classes I see so many cases where things don't work or you have to know certain things. For example, there is no remove call in XML objects. Instead of xml.remove() you have to do this:
delete xml.parent()[xml.name()][xml.childIndex()];
There are plenty of places where improvements could be made with core language classes but it seems they stagnate. Some things haven't changed in over 30 years.
Why is that and can we add better calls instead of using the rotting corpse of yesterdays API's?
I wish that these features were added.