修复了枚举状态扩展中隐藏的缺陷;

添加了在列表中随机获取项目的扩展;
添加了数值转中文格式的繁体字库;
This commit is contained in:
2023-10-30 09:40:45 +08:00
parent e293c5592d
commit 42d3fbc69f
3 changed files with 33 additions and 11 deletions
+5 -1
View File
@@ -62,6 +62,11 @@ namespace XericLibrary.Runtime.MacroLibrary
private static readonly string[] chineseDigit = new string[]
{ "","十","百","千","万","十","百","千","亿","十","百","千","亿"};
private static readonly string[] chineseNumber_ComplexFont = new string[]
{"零","壹","贰","叁","肆","伍","陆","柒","捌","玖"};
private static readonly string[] chineseDigit_ComplexFont = new string[]
{ "","拾","佰","仟","万","拾","佰","仟","亿","拾","佰","仟","亿"};
/// <summary>
/// 将一个数值转为中文小写格式;
/// </summary>
@@ -98,7 +103,6 @@ namespace XericLibrary.Runtime.MacroLibrary
/// 将一个数值转为中文小写格式,并确保读写格式满足日常使用;
/// 比如 510会读成五百一十,9009会读成九千零九,
/// 最大支持到九千亿,理论上并不是它的极限,只要继续套格式即可。
/// 不过缺点是在读10,11时,会读成一十,一十一,需要额外处理一下以符合阅读习惯
/// </summary>
/// <param name="number"></param>
/// <returns></returns>