cast
cast copied to clipboard
the function ToInt sometimes has some mistakes
eg: a := "0100" b := cast.ToInt(a) fmt.Println(b)
the result is 64 but what i want is 100
0100 is a number in base 8, therefore it means 64, not 100.
0100 is a number in base 8, therefore it means 64, not 100. thanks for your reply! in my code:
a :="0100" the type of a is string ,so i still think this is a mistake