OLD | NEW |
---|---|
1 // Copyright 2016 The Chromium Authors. All rights reserved. | 1 // Copyright 2016 The Chromium Authors. All rights reserved. |
2 // Use of this source code is governed by a BSD-style license that can be | 2 // Use of this source code is governed by a BSD-style license that can be |
3 // found in the LICENSE file. | 3 // found in the LICENSE file. |
4 | 4 |
5 #ifndef String16_h | 5 #ifndef String16_h |
6 #define String16_h | 6 #define String16_h |
7 | 7 |
8 #if V8_INSPECTOR_USE_STL | 8 #if V8_INSPECTOR_USE_STL |
9 #include "platform/inspector_protocol/String16STL.h" | 9 #include "platform/inspector_protocol/String16STL.h" |
10 #else | 10 #else |
11 #include "platform/inspector_protocol/String16WTF.h" | 11 #include "platform/inspector_protocol/String16WTF.h" |
12 #endif // V8_INSPECTOR_USE_STL | 12 #endif // V8_INSPECTOR_USE_STL |
13 | 13 |
14 #include "platform/inspector_protocol/Platform.h" | |
15 | |
16 #include <vector> | |
17 | |
18 namespace blink { | |
19 namespace protocol { | |
20 | |
21 PLATFORM_EXPORT bool isASCIISpace(UChar); | |
pfeldman
2016/08/09 17:20:38
Looks like String16Base others inherit from to me.
| |
22 PLATFORM_EXPORT bool isSpaceOrNewLine(UChar); | |
23 PLATFORM_EXPORT String16 string16FromInteger(int); | |
24 PLATFORM_EXPORT String16 string16FromDouble(double); | |
25 PLATFORM_EXPORT String16 string16FromDoublePrecision3(double); | |
26 PLATFORM_EXPORT String16 string16FromDoublePrecision6(double); | |
27 PLATFORM_EXPORT double string16CharactersToDouble(const UChar*, size_t, bool* ok = nullptr); | |
28 PLATFORM_EXPORT int string16CharactersToInt(const UChar*, size_t, bool* ok = nul lptr); | |
29 PLATFORM_EXPORT String16 string16StripWhiteSpace(const String16&); | |
30 PLATFORM_EXPORT bool string16StartsWith(const String16&, const char* prefix); | |
31 | |
32 class String16Builder { | |
33 public: | |
34 String16Builder(); | |
35 void append(const String16&); | |
36 void append(UChar); | |
37 void append(char); | |
38 void append(const UChar*, size_t); | |
39 void append(const char*, size_t); | |
40 String16 toString(); | |
41 void reserveCapacity(size_t); | |
42 | |
43 private: | |
44 std::vector<UChar> m_buffer; | |
45 }; | |
46 | |
47 } // namespace protocol | |
48 } // namespace blink | |
49 | |
50 using String16 = blink::protocol::String16; | |
51 using String16Builder = blink::protocol::String16Builder; | |
52 | |
14 #endif // !defined(String16_h) | 53 #endif // !defined(String16_h) |
OLD | NEW |