Home Ruby 格式化数字 , format number leading 0
Post
Cancel

Ruby 格式化数字 , format number leading 0

参考

https://stackoverflow.com/questions/1543171/how-can-i-output-leading-zeros-in-ruby

"%010d" % 223

0000000223

This post is licensed under CC BY 4.0 by the author.