I intend to check if a string is a substring of another string. However, case insensitive match is not possible since toLowerCase() and toUpperCase() methods are not supported in Rhino 1.7.13.
var stored_string="{{SSHA1}9BC34549D565D9505B287DE0CD20AC77BE1D3F2C"
var str = "9bc34549d565d9505b287de0cd20ac77be1d3f2c"
I am using indexOf mathod to check for the substring.
if (stored_string.toString().indexOf(str)===0) {
//do something
}
Is there any good way this comparison is possible case insensitive?