Converts Bangla digits to English digits. Non-digit characters and existing English digits are retained as is.
The string or number to convert.
If true, throws an error for invalid input.
true
The converted string with English digits.
If the input is null, undefined, or exceeds the maximum safe integer value.
null
undefined
toEnglishDigits("১২৩"); // "123"toEnglishDigits("১২৩.৪৫"); // "123.45"toEnglishDigits("123.45"); // "123.45" (no change)toEnglishDigits("abc"); // "abc" (non-numeric characters are retained) Copy
toEnglishDigits("১২৩"); // "123"toEnglishDigits("১২৩.৪৫"); // "123.45"toEnglishDigits("123.45"); // "123.45" (no change)toEnglishDigits("abc"); // "abc" (non-numeric characters are retained)
Converts Bangla digits to English digits. Non-digit characters and existing English digits are retained as is.