1 2 3 4 5 6 7
txt = text.sourceText.replace(/\r?\n|\r/g,''); check = "1"; result = 0; if (txt[textIndex-1] == check){ result = 100; } result