summaryrefslogtreecommitdiffstats
path: root/Source/JavaScriptCore/wtf/text/StringImpl.h
diff options
context:
space:
mode:
Diffstat (limited to 'Source/JavaScriptCore/wtf/text/StringImpl.h')
-rw-r--r--Source/JavaScriptCore/wtf/text/StringImpl.h10
1 files changed, 10 insertions, 0 deletions
diff --git a/Source/JavaScriptCore/wtf/text/StringImpl.h b/Source/JavaScriptCore/wtf/text/StringImpl.h
index dc1dbb2..25411e1 100644
--- a/Source/JavaScriptCore/wtf/text/StringImpl.h
+++ b/Source/JavaScriptCore/wtf/text/StringImpl.h
@@ -354,6 +354,16 @@ inline bool equalIgnoringCase(const char* a, const UChar* b, unsigned length) {
bool equalIgnoringNullity(StringImpl*, StringImpl*);
+template<size_t inlineCapacity>
+bool equalIgnoringNullity(const Vector<UChar, inlineCapacity>& a, StringImpl* b)
+{
+ if (!b)
+ return !a.size();
+ if (a.size() != b->length())
+ return false;
+ return !memcmp(a.data(), b->characters(), b->length());
+}
+
int codePointCompare(const StringImpl*, const StringImpl*);
static inline bool isSpaceOrNewline(UChar c)