summaryrefslogtreecommitdiff
path: root/poppler/UTF.h
diff options
context:
space:
mode:
Diffstat (limited to 'poppler/UTF.h')
-rw-r--r--poppler/UTF.h6
1 files changed, 6 insertions, 0 deletions
diff --git a/poppler/UTF.h b/poppler/UTF.h
index 9c3c6817..9f0290db 100644
--- a/poppler/UTF.h
+++ b/poppler/UTF.h
@@ -48,6 +48,12 @@ inline bool UnicodeIsValid(Unicode ucs4)
return (ucs4 < 0x110000) && ((ucs4 & 0xfffff800) != 0xd800) && (ucs4 < 0xfdd0 || ucs4 > 0xfdef) && ((ucs4 & 0xfffe) != 0xfffe);
}
+// check whether string starts with Big-Endian byte order mark
+inline bool hasUnicodeByteOrderMark(const std::string &s)
+{
+ return s.starts_with(unicodeByteOrderMark);
+}
+
// is a unicode whitespace character
bool UnicodeIsWhitespace(Unicode ucs4);