OLD | NEW |
1 // Copyright 2016 the V8 project authors. All rights reserved. | 1 // Copyright 2016 the V8 project 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 V8_INSPECTOR_STRINGUTIL_H_ | 5 #ifndef V8_INSPECTOR_STRINGUTIL_H_ |
6 #define V8_INSPECTOR_STRINGUTIL_H_ | 6 #define V8_INSPECTOR_STRINGUTIL_H_ |
7 | 7 |
8 #include <memory> | 8 #include <memory> |
9 | 9 |
10 #include "src/base/logging.h" | 10 #include "src/base/logging.h" |
(...skipping 14 matching lines...) Expand all Loading... |
25 class StringUtil { | 25 class StringUtil { |
26 public: | 26 public: |
27 static String substring(const String& s, size_t pos, size_t len) { | 27 static String substring(const String& s, size_t pos, size_t len) { |
28 return s.substring(pos, len); | 28 return s.substring(pos, len); |
29 } | 29 } |
30 static String fromInteger(int number) { return String::fromInteger(number); } | 30 static String fromInteger(int number) { return String::fromInteger(number); } |
31 static String fromInteger(size_t number) { | 31 static String fromInteger(size_t number) { |
32 return String::fromInteger(number); | 32 return String::fromInteger(number); |
33 } | 33 } |
34 static String fromDouble(double number) { return String::fromDouble(number); } | 34 static String fromDouble(double number) { return String::fromDouble(number); } |
| 35 static double toDouble(const char* s, size_t len, bool* isOk); |
35 static size_t find(const String& s, const char* needle) { | 36 static size_t find(const String& s, const char* needle) { |
36 return s.find(needle); | 37 return s.find(needle); |
37 } | 38 } |
38 static size_t find(const String& s, const String& needle) { | 39 static size_t find(const String& s, const String& needle) { |
39 return s.find(needle); | 40 return s.find(needle); |
40 } | 41 } |
41 static const size_t kNotFound = String::kNotFound; | 42 static const size_t kNotFound = String::kNotFound; |
42 static void builderAppend(StringBuilder& builder, const String& s) { | 43 static void builderAppend(StringBuilder& builder, const String& s) { |
43 builder.append(s); | 44 builder.append(s); |
44 } | 45 } |
(...skipping 36 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... |
81 explicit StringBufferImpl(String16&); | 82 explicit StringBufferImpl(String16&); |
82 String16 m_owner; | 83 String16 m_owner; |
83 StringView m_string; | 84 StringView m_string; |
84 | 85 |
85 DISALLOW_COPY_AND_ASSIGN(StringBufferImpl); | 86 DISALLOW_COPY_AND_ASSIGN(StringBufferImpl); |
86 }; | 87 }; |
87 | 88 |
88 } // namespace v8_inspector | 89 } // namespace v8_inspector |
89 | 90 |
90 #endif // V8_INSPECTOR_STRINGUTIL_H_ | 91 #endif // V8_INSPECTOR_STRINGUTIL_H_ |
OLD | NEW |