A simpler variant :
Code:
var k=0;
while (ligning.substring(k) && ligning.substring(k,k+1)!=='=') k++;
if (ligning.substring(k,k+1)==='=') {// We find the sign =
var b = ligning.substring(0,k);
var c = ligning.substring(k+1, 200);
}
else alert('This entry is not an equation');
But, an other sign = is possible in c !!!
Incidentally, there is no need to make a loop to find and cut a string on a sign =
Code:
var arrEqt = ligning.split('='); // give immediately arrEqt[0] and arrEqt[1] if the length of arrEqt is two !
Please use the Go Advanced and Code buttons...