Index: third_party/WebKit/Source/platform/inspector_protocol/String16STL.cpp |
diff --git a/third_party/WebKit/Source/platform/inspector_protocol/String16STL.cpp b/third_party/WebKit/Source/platform/inspector_protocol/String16STL.cpp |
index 4883f4ceda46e11f284f06dc4909a8d2f47eca32..009d1fce787cd244f2adf160c5b501181386dd03 100644 |
--- a/third_party/WebKit/Source/platform/inspector_protocol/String16STL.cpp |
+++ b/third_party/WebKit/Source/platform/inspector_protocol/String16STL.cpp |
@@ -52,24 +52,6 @@ template<typename CharType> inline bool isASCIIPrintable(CharType c) |
return c >= ' ' && c <= '~'; |
} |
-/* |
- Statistics from a run of Apple's page load test for callers of isASCIISpace: |
- |
- character count |
- --------- ----- |
- non-spaces 689383 |
- 20 space 294720 |
- 0A \n 89059 |
- 09 \t 28320 |
- 0D \r 0 |
- 0C \f 0 |
- 0B \v 0 |
- */ |
-template<typename CharType> inline bool isASCIISpace(CharType c) |
-{ |
- return c <= ' ' && (c == ' ' || (c <= 0xD && c >= 0x9)); |
-} |
- |
extern const LChar ASCIICaseFoldTable[256] = { |
0x00, 0x01, 0x02, 0x03, 0x04, 0x05, 0x06, 0x07, 0x08, 0x09, 0x0a, 0x0b, 0x0c, 0x0d, 0x0e, 0x0f, |
0x10, 0x11, 0x12, 0x13, 0x14, 0x15, 0x16, 0x17, 0x18, 0x19, 0x1a, 0x1b, 0x1c, 0x1d, 0x1e, 0x1f, |
@@ -503,42 +485,6 @@ String16 String16::fromUTF8(const char* stringStart, size_t length) |
return String16(bufferStart, utf16Length); |
} |
-// trim from start |
-static inline wstring <rim(wstring &s) |
-{ |
- s.erase(s.begin(), std::find_if(s.begin(), s.end(), std::not1(std::ptr_fun<int, int>(std::isspace)))); |
- return s; |
-} |
- |
-// trim from end |
-static inline wstring &rtrim(wstring &s) |
-{ |
- s.erase(std::find_if(s.rbegin(), s.rend(), std::not1(std::ptr_fun<int, int>(std::isspace))).base(), s.end()); |
- return s; |
-} |
- |
-// trim from both ends |
-static inline wstring &trim(wstring &s) |
-{ |
- return ltrim(rtrim(s)); |
-} |
- |
-// static |
-std::string String16::intToString(int i) |
-{ |
- char buffer[50]; |
- std::sprintf(buffer, "%d", i); |
- return std::string(buffer); |
-} |
- |
-// static |
-std::string String16::doubleToString(double d) |
-{ |
- char buffer[100]; |
- std::sprintf(buffer, "%f", d); |
- return std::string(buffer); |
-} |
- |
std::string String16::utf8() const |
{ |
unsigned length = this->length(); |
@@ -585,12 +531,5 @@ std::string String16::utf8() const |
return std::string(bufferVector.data(), buffer - bufferVector.data()); |
} |
-String16 String16::stripWhiteSpace() const |
-{ |
- wstring result(m_impl); |
- trim(result); |
- return result; |
-} |
- |
} // namespace protocol |
} // namespace blink |