If you look at the jsfiddle from question,
var str = \"Abc: Lorem ipsum sit amet\"; str = str.substring(str.indexOf(\":\") + 1);
This retur
And note that first argument of subString is 0 based while second is one based.
Example:
String str= "0123456"; String sbstr= str.substring(0,5);
Output will be sbstr= 01234 and not sbstr = 012345
sbstr= 01234
sbstr = 012345