Q:

Not able to use string function in ExtJS 2

I am working rally sdk2 app & ExtJS 2, I want to get all the release names which starts with "Release" so I used this function startsWith( s, start, [ignoreCase] ) as Ext.String.startsWith(rName, "Release") but it gives me error undefined is not a function.
I know it's a small thing but I am not getting it working

A:

In Ext JS 2.0 there is no Ext.String class nor startsWith method. Class is available from 4.0 and method from 4.2.
Here is fiddle that shows that it works in 5.0.
You can use use indexOf instead easily: rName.indexOf("Release") === 0

