标签:print code bit pre printf beef otc dead unicode
fmt.Println() var bit uint8 = 1<<1 | 1<<2 fmt.Printf("%08b\n",bit) var oct int = 066 fmt.Printf("%d %[1]o %#[1]o\n",otc)// "438 666 0666" xx := int64(0xdeadbeef) fmt.Printf("%d %[1]x %#[1]x %#[1]X\n", xx)//3735928559 deadbeef 0xdeadbeef 0XDEADBEEF unicode := ‘国‘ fmt.Printf("%d %[1]c %[1]q\n", unicode) // "22269 国 ‘国‘"
标签:print code bit pre printf beef otc dead unicode
原文地址:https://www.cnblogs.com/tailiang/p/11612337.html