增加判断
This commit is contained in:
@@ -7,6 +7,8 @@ def handle_decimal(string):
|
||||
if not string:
|
||||
return ""
|
||||
string = re.sub(r'[^0-9.]', '', string)
|
||||
if "." not in string:
|
||||
return string
|
||||
front, back = string.rsplit('.', 1)
|
||||
front = front.replace(".", "")
|
||||
if back:
|
||||
|
||||
Reference in New Issue
Block a user