the function ToInt sometimes has some mistakes
answergong opened this issue · 2 comments
answergong commented
eg:
a := "0100"
b := cast.ToInt(a)
fmt.Println(b)
the result is 64 but what i want is 100
yveshield commented
0100 is a number in base 8, therefore it means 64, not 100.
answergong commented
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