﻿function toIndianNumbers(digits) {
    var newValue = "";
    //var digits = "1234"; // this is your input string
    for (var i = 0; i < digits.length; i++) {
        var ch = digits.charCodeAt(i);
        if (ch >= 48 && ch <= 57) {
            // european digit range
            var newChar = ch + 1584;
            newValue = newValue + String.fromCharCode(newChar);
        }
        else
            newValue = newValue + String.fromCharCode(ch);
    }
    return newValue;
}
