def ts(st)
st.to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,")
end
给数字加千位符
最新推荐文章于 2024-03-21 17:27:20 发布
def ts(st)
st.to_s.gsub(/(\d)(?=(\d\d\d)+(?!\d))/, "\\1,")
end