Check if char is escape (27)

How can I check if a char has value 27/escape? There's no '\e' and char being unicode doesn't seem to have a good way to coerce into u8?

You could use '\x1b', or c as u32.

or =='\u{1b}'

1 Like