mirror of
https://github.com/iDvel/rime-ice.git
synced 2026-05-14 00:30:37 +08:00
chore: clean code
This commit is contained in:
@@ -63,8 +63,6 @@ end
|
||||
|
||||
-- 数值转换为中文
|
||||
local function number2cnChar(num, flag, digitUnit, wordFigure) --flag=0中文小写反之为大写
|
||||
local result = ""
|
||||
|
||||
if tonumber(flag) < 1 then
|
||||
digitUnit = digitUnit or { [1] = "万", [2] = "亿" }
|
||||
wordFigure = wordFigure or { [1] = "〇", [2] = "一", [3] = "十", [4] = "元" }
|
||||
@@ -73,6 +71,7 @@ local function number2cnChar(num, flag, digitUnit, wordFigure) --flag=0中文小
|
||||
wordFigure = wordFigure or { [1] = "零", [2] = "壹", [3] = "拾", [4] = "元" }
|
||||
end
|
||||
local lens = string.len(num)
|
||||
local result
|
||||
if lens < 5 then
|
||||
result = formatNum(num, flag)
|
||||
elseif lens < 9 then
|
||||
|
||||
Reference in New Issue
Block a user