2018-12-01から1ヶ月間の記事一覧
Golangで文字列数値をカンマ区切りにするメモ。 カンマ区切りにするために dustin/go-humanize を使用する。 s := "10000" i, _ := strconv.Atoi(s) // 文字列を数値にする c := humanize.Comma(int64(i)) // int64に変換して、カンマ区切りにする fmt.Print…
Golangで文字列数値をカンマ区切りにするメモ。 カンマ区切りにするために dustin/go-humanize を使用する。 s := "10000" i, _ := strconv.Atoi(s) // 文字列を数値にする c := humanize.Comma(int64(i)) // int64に変換して、カンマ区切りにする fmt.Print…