I need to substring a variable, and not an object, I know objects such as;
$("div#foo").text().substr(0,1);
But I need to do it on a non-object, for example a variable;
var foo = 'abc';
foo = foo.substr(0,1);
The second example won't work, because it's a non object. The actual problem is that I need to cut the last character off from a string, so is it possible to do this in jQuery on a non-object?