refactor: 预留并行修复所需的共享接口
This commit is contained in:
@@ -0,0 +1,11 @@
|
||||
def normalize_id(value) -> str:
|
||||
if value is None:
|
||||
return ""
|
||||
text = str(value).strip().strip("\ufeff")
|
||||
text = text.translate(str.maketrans("0123456789", "0123456789"))
|
||||
text = "".join(text.split())
|
||||
if text.endswith(".0") and text[:-2].isdigit():
|
||||
text = text[:-2]
|
||||
if not text or not text.isdigit():
|
||||
return ""
|
||||
return text
|
||||
Reference in New Issue
Block a user