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