3 ms·
I thought about saying (c + 'A') - 'a' to make this more clear, but I think that's actually UB with signed chars- e.g. for c='a', 'a'+'A' exceeds the range
by XMPPwocky 7y ago
I thought about saying
(c + 'A') - 'a'
to make this more clear, but I think that's actually UB with signed chars- e.g. for c='a', 'a'+'A' exceeds the range of a signed 8-bit value!
Promotion should save us here, but that's a bit too yikes-y for my comfort.