isHighSurrogate static method

bool isHighSurrogate(
  1. int value
)

Returns true iff the given value is a valid UTF-16 high (first) surrogate. The value must be a UTF-16 code unit, meaning it must be in the range 0x0000-0xFFFF.

See also:

Implementation

static bool isHighSurrogate(int value) {
  assert(_isUTF16(value));
  return value & 0xFC00 == 0xD800;
}