Files
dababase-etl-python/core/utils.py
2026-03-04 12:17:52 +08:00

17 lines
307 B
Python
Raw Blame History

This file contains ambiguous Unicode characters
This file contains Unicode characters that might be confused with other characters. If you think that this is intentional, you can safely ignore this warning. Use the Escape button to reveal them.
"""通用工具模块
提供项目可能用到的工具函数。
"""
def to_safe_str(value) -> str:
"""安全地将任意值转换为字符串
Args:
value: 任意值
Returns:
str: 字符串表示None 将转换为 ""
"""
return "" if value is None else str(value)