Skip to content

decimalLength(x)

获取小数部分长度

示例

typescript
decimalLength(1.123); // 3
decimalLength(".001"); // 3
decimalLength("1.0"); // 1