Returns 1 for BMP code points, 2 for supplementary plane code points.
Useful to determine how many string indices a code point occupies.
int codePointSize(int code) => code < 0x10000 ? 1 : 2;