Things are similar with the bit-wise OR. Because of
'y' in ASCII / UTF-8 is 79[sub]hex[/sub]
'Y' in ASCII / UTF-8 is 59[sub]hex[/sub]
the difference is just 20[sub]hex[/sub], what is typical for all latin letters. Hence
( ch | 0x20 ) == 'y'
can be used to check for both 'y' and 'Y'. However, also here the parentheses are required, or else the == would be evaluated before the |.
I haven't worked with the bit-wise operators before, so I wouldn't know why it would work, and how it compares, though.