Parses various input formats into a standard decimal string. Supports currencies ($€£¥), commas, underscores, scientific notation (e+), and custom subscript notation.
Params
- value (NumberType): The input value to parse. Can be a number, string, or bigint.
Returns
(string): A standardized decimal string (e.g., "1234.56").
Example
value
function clearLeadingZero(value: string): string
Removes trailing zeros from a decimal string (e.g., '1.500' -> '1.5').
Params
- value: string: The number string to clean.
Return
(string): The cleaned number string.
Example
value
function clearLeadingZero(value: string): string
Removes leading zeros from a string (e.g., '005' -> '5').
Params
- value: string: The number string to clean.
Return
(string): The cleaned number string.
Example
value
function clearLeadingZero(value: string): string
Removes redundant leading and trailing zeros from a number string.
Params
- value: string: The number string to clean.
Return
(string): The cleaned number string.
Example
value