Index: third_party/WebKit/Source/platform/inspector_protocol/String16_h.template |
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/String16_h.template b/third_party/WebKit/Source/platform/inspector_protocol/String16_h.template |
index e6f8f0c78465ae686ac3e2bf089f633eb56862ee..67086a3a289f6355aa94b42ae991ba591606f629 100644 |
--- a/third_party/WebKit/Source/platform/inspector_protocol/String16_h.template |
+++ b/third_party/WebKit/Source/platform/inspector_protocol/String16_h.template |
@@ -80,6 +80,12 @@ public: |
return internal::strToDouble(buffer.data(), ok); |
} |
+ static double charactersToDouble(const uint8_t* characters, size_t length, bool* ok = nullptr) |
+ { |
+ std::string buffer(reinterpret_cast<const char*>(characters), length); |
+ return internal::strToDouble(buffer.c_str(), ok); |
+ } |
+ |
static int charactersToInteger(const C* characters, size_t length, bool* ok = nullptr) |
{ |
std::vector<char> buffer; |
@@ -136,17 +142,6 @@ public: |
return T(static_cast<const T&>(*this)); |
return T(characters + start, end + 1 - start); |
} |
- |
- bool startsWith(const char* prefix) const |
- { |
- const C* characters = static_cast<const T&>(*this).characters16(); |
- size_t length = static_cast<const T&>(*this).length(); |
- for (size_t i = 0, j = 0; prefix[j] && i < length; ++i, ++j) { |
- if (characters[i] != prefix[j]) |
- return false; |
- } |
- return true; |
- } |
}; |
} // namespace protocol |