помогите дописать, вот я добавил в скрипт:
// three character letters
t_table3 = "schSchSCH";
w_table3 = "щЩЩ";
// Check for 3-character letters
is3char=false;
if (i < len-2) {
for(j = 0; j < w_table3.length; j++)
{
if(str.substr(i, 3) == t_table3.substr(j*3,3)) {
new_str+= w_table3.substr(j, 1);
i++;
is3char=true;
break;
}
}
}
когда тестирую комбинацию sch - то он выдает щч.