Follow along with the video below to see how to install our site as a web app on your home screen.
Note: This feature may not be available in some browsers.
myVar = substr2(myVar, x, y); //Your function
myVar = myVar.substr(x, y); //built-in function
String.prototype.trim = function(){return
(this.replace(/^[\s\xA0]+/, "").replace(/[\s\xA0]+$/, ""))}
String.prototype.startsWith = function(str)
{return (this.match("^"+str)==str)}
String.prototype.endsWith = function(str)
{return (this.match(str+"$")==str)}
var myStr = ô Earth is a beautiful planet ö;
var myStr2 = myStr.trim();
//==ôEarth is a beautiful planetö;
if (myStr2.startsWith(ôEarthö)) // returns TRUE
if (myStr2.endsWith(ôplanetö)) // returns TRUE
if (myStr.startsWith(ôEarthö))
// returns FALSE due to the leading spacesà
if (myStr.endsWith(ôplanetö))
// returns FALSE due to trailing spacesà