My bad, EOF is not a character (defined as a negative integer) and these functions must handle that, so @truncate instead of @intCast.
My bad, EOF is not a character (defined as a negative integer) and these functions must handle that, so `@truncate` instead of `@intCast`.