How to fmt.Printf an integer with thousands comma

后端 未结 13 1909
独厮守ぢ
独厮守ぢ 2020-12-04 21:21

Does Go\'s fmt.Printf support outputting a number with the thousands comma?

fmt.Printf(\"%d\", 1000) outputs 1000, what format

13条回答
  •  暗喜
    暗喜 (楼主)
    2020-12-04 21:56

    None of the fmt print verbs support thousands separators.

提交回复
热议问题