mirror of
https://github.com/gopl-zh/gopl-zh.github.com.git
synced 2025-08-05 23:21:51 +00:00
fix errata
This commit is contained in:
@@ -16,7 +16,7 @@ FormatInt和FormatUint函數可以用不同的進製來格式化數字:
|
||||
fmt.Println(strconv.FormatInt(int64(x), 2)) // "1111011"
|
||||
```
|
||||
|
||||
fmt.Printf函數的%b、%d、%u和%x等參數提供功能往往比strconv包的Format函數方便很多,特别是在需要包含附加額外信息的時候:
|
||||
fmt.Printf函數的%b、%d、%o和%x等參數提供功能往往比strconv包的Format函數方便很多,特别是在需要包含附加額外信息的時候:
|
||||
|
||||
```Go
|
||||
s := fmt.Sprintf("x=%b", x) // "x=1111011"
|
||||
|
Reference in New Issue
Block a user