panic error?
No
For signed integers, the most significant bit is the signed bit. While unsigned integers doesn't have the signed bit. So for unsigned integers, -1 means 255, cause the binary format of -1 is 11111111 https://en.wikipedia.org/wiki/Bit_numbering
I knew that but: - you’re comparing against larger than or equal to 0 - this is not a bug, it’s a design principle - string lengths don’t have negative values
Обсуждают сегодня