2013-04-28 48 views

回答

12

使用"%0xd"标志为,其中是要填充的前导零的数量。

import "fmt" 
fmt.Printf("%03d", 4) // will print "004" 

的接口是相同C.