在Go語言中資料型別是不會自動轉換,需手動進行資料型別的轉換。 ... Printf("%T %v", str1, str1) //string 10 // 通過Sprintf轉換 str2 := fmt.Sprintf("%d", i) fmt.
確定! 回上一頁