mirror of
https://gitee.com/chinabugotech/hutool.git
synced 2025-07-21 15:09:48 +08:00
feat:增加数字缩写转换
This commit is contained in:
@@ -12,5 +12,14 @@ public class NumberWordFormatTest {
|
||||
|
||||
String format2 = NumberWordFormatter.format("2100.00");
|
||||
Assert.assertEquals("TWO THOUSAND ONE HUNDRED AND CENTS ONLY", format2);
|
||||
|
||||
String format3 = NumberWordFormatter.formatValue(4384324, false);
|
||||
Assert.assertEquals("4.38m", format3);
|
||||
|
||||
String format4 = NumberWordFormatter.formatValue(4384324);
|
||||
Assert.assertEquals("438.43w", format4);
|
||||
|
||||
String format5 = NumberWordFormatter.formatValue(438);
|
||||
Assert.assertEquals("438", format5);
|
||||
}
|
||||
}
|
||||
|
Reference in New Issue
Block a user