@akunohana Apologies if I'm missing something, but 0x30, 0x39, and 0x18 are merely hex notation for integers. You could have written 48, 57, and 24 instead for the same effect. Or you (probably?) could have used char literals like '0', '9' (I guess there isn't one for U+0018).

UTF-8 determines how the characters are encoded, i.e. what sequence of numbers (ints) they are represented by. So there's no special understanding of Unicode or hex going on here; you're comparing numbers (as you should).

LOL (please excuse my early 2000’s slang)

Thanks for that clarification.

What I still don’t quite understand is, does this mean that there is no “checking against an ASCII table” or “lookup” going on? But how then does it know that 0x18 is CAN (disregard)?

Imagine you want to cypher a text, you can have a table with a column with the char you really want to be the meaning and another column with the obscured representation, what you write is the obscured thing, but when you read you take out that table to translate to the original meaning. Computers do sort of the same thing with the translation from bits to letters.