cast icon indicating copy to clipboard operation
cast copied to clipboard

cast.ToInt("08") returned 0

Open zangsilu opened this issue 2 years ago • 1 comments

invalid syntax, returned 0 But the correct one is to return 8 castError

zangsilu avatar Jun 28 '22 10:06 zangsilu

The string "08" is not a decimal number, decimal numbers do not have the prefix "0", nor is it an octal number, octal numbers are only 0-7, nor is it a hexadecimal number, the hexadecimal prefix is "0x ". I don't think this is a problem with the library, I think it's important to be aware of this limitation before using the library and avoid it in advance.

yveshield avatar Jul 07 '22 05:07 yveshield