Unverified Commit 42e67550 authored by Justin McCandless's avatar Justin McCandless Committed by GitHub

Update inaccurate documentation for isUtf16Surrogate method (#60219)

parent f8c9e1bb
...@@ -601,8 +601,11 @@ class TextPainter { ...@@ -601,8 +601,11 @@ class TextPainter {
canvas.drawParagraph(_paragraph, offset); canvas.drawParagraph(_paragraph, offset);
} }
// Complex glyphs can be represented by two or more UTF16 codepoints. This // Returns true iff the given value is a valid UTF-16 surrogate. The value
// checks if the value represents a UTF16 glyph by itself or is a 'surrogate'. // must be a UTF-16 code unit, meaning it must be in the range 0x0000-0xFFFF.
//
// See also:
// * https://en.wikipedia.org/wiki/UTF-16#Code_points_from_U+010000_to_U+10FFFF
static bool _isUtf16Surrogate(int value) { static bool _isUtf16Surrogate(int value) {
return value & 0xF800 == 0xD800; return value & 0xF800 == 0xD800;
} }
......
Markdown is supported
0% or
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment