public class NumberChineseFormatter extends Object
1. 数字转中文大写形式,比如一百二十一 2. 数字转金额用的大写形式,比如:壹佰贰拾壹 3. 转金额形式,比如:壹佰贰拾壹整
Constructor and Description |
---|
NumberChineseFormatter() |
Modifier and Type | Method and Description |
---|---|
static String |
format(double amount,
boolean isUseTraditional)
阿拉伯数字转换成中文,小数点后四舍五入保留两位.
|
static String |
format(double amount,
boolean isUseTraditional,
boolean isMoneyMode)
阿拉伯数字转换成中文,小数点后四舍五入保留两位.
|
static String |
numberCharToChinese(char c,
boolean isUseTraditional)
数字字符转中文,非数字字符原样返回
|
public static String format(double amount, boolean isUseTraditional)
amount
- 数字isUseTraditional
- 是否使用繁体public static String format(double amount, boolean isUseTraditional, boolean isMoneyMode)
amount
- 数字isUseTraditional
- 是否使用繁体isMoneyMode
- 是否为金额模式public static String numberCharToChinese(char c, boolean isUseTraditional)
c
- 数字字符isUseTraditional
- 是否繁体Copyright © 2021. All rights reserved.