summaryrefslogtreecommitdiff
path: root/deps/v8/src/unicode-inl.h
diff options
context:
space:
mode:
Diffstat (limited to 'deps/v8/src/unicode-inl.h')
-rw-r--r--deps/v8/src/unicode-inl.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/deps/v8/src/unicode-inl.h b/deps/v8/src/unicode-inl.h
index b22e482528..ebebfaa1bd 100644
--- a/deps/v8/src/unicode-inl.h
+++ b/deps/v8/src/unicode-inl.h
@@ -137,6 +137,12 @@ unsigned Utf8::Length(uchar c, int previous) {
}
}
+bool Utf8::IsValidCharacter(uchar c) {
+ return c < 0xD800u || (c >= 0xE000u && c < 0xFDD0u) ||
+ (c > 0xFDEFu && c <= 0x10FFFFu && (c & 0xFFFEu) != 0xFFFEu &&
+ c != kBadChar);
+}
+
} // namespace unibrow
#endif // V8_UNICODE_INL_H_