[strconv] Convert uint64 to string

천현철·2021년 7월 18일
0

Golang

목록 보기
6/13
post-custom-banner
package main

import (
    "fmt"
    "strconv"
)

func main() {

    // Create our number
    var myNumber uint64
    myNumber = 18446744073709551615
    
    // Format to a string by passing the number and it's base.
    str := strconv.FormatUint(myNumber, 10)

    // Print as string
    // Will output: 'The number is: 18446744073709551615'
    fmt.Println("The number is: " + str)
}

https://golangcode.com/uint64-to-string/

profile
기도하지말고 행동하라

0개의 댓글