Treat HTTP status codes as strings

13.05.2017

Web

I usually see HTTP status codes being checked as integer numbers: if ((status >= 200) && (status < 300)) // or `<= 299` This is rather verbose. But if you think about it, it's the first digit in the number that has a special value, and there are only five ...