Data commit
This commit is contained in:
parent
7387c8f97b
commit
cb5bb5e222
199093 changed files with 3378972 additions and 0 deletions
|
|
@ -0,0 +1,21 @@
|
|||
package main
|
||||
|
||||
import (
|
||||
"fmt"
|
||||
"math/big"
|
||||
"strconv"
|
||||
)
|
||||
|
||||
func main () {
|
||||
s := strconv.FormatInt(26, 16) // returns the string "1a"
|
||||
fmt.Println(s)
|
||||
|
||||
i, err := strconv.ParseInt("1a", 16, 64) // returns the integer (int64) 26
|
||||
if err == nil {
|
||||
fmt.Println(i)
|
||||
}
|
||||
b, ok := new(big.Int).SetString("1a", 16) // returns the big integer 26
|
||||
if ok {
|
||||
fmt.Println(b)
|
||||
}
|
||||
}
|
||||
Loading…
Add table
Add a link
Reference in a new issue