OLD | NEW |
---|---|
1 // Copyright 2015 the V8 project authors. All rights reserved. | 1 // Copyright 2015 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_OBJECTS_H_ | 5 #ifndef V8_OBJECTS_H_ |
6 #define V8_OBJECTS_H_ | 6 #define V8_OBJECTS_H_ |
7 | 7 |
8 #include <iosfwd> | 8 #include <iosfwd> |
9 #include <memory> | 9 #include <memory> |
10 | 10 |
(...skipping 9233 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
9244 // sequences of UTF-16 code unit values differs from that on sequences of code | 9244 // sequences of UTF-16 code unit values differs from that on sequences of code |
9245 // point values. | 9245 // point values. |
9246 MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x, | 9246 MUST_USE_RESULT static ComparisonResult Compare(Handle<String> x, |
9247 Handle<String> y); | 9247 Handle<String> y); |
9248 | 9248 |
9249 // Perform string match of pattern on subject, starting at start index. | 9249 // Perform string match of pattern on subject, starting at start index. |
9250 // Caller must ensure that 0 <= start_index <= sub->length(). | 9250 // Caller must ensure that 0 <= start_index <= sub->length(). |
9251 static int IndexOf(Isolate* isolate, Handle<String> sub, Handle<String> pat, | 9251 static int IndexOf(Isolate* isolate, Handle<String> sub, Handle<String> pat, |
9252 int start_index); | 9252 int start_index); |
9253 | 9253 |
9254 static Object* LastIndexOf(Isolate* isolate, Handle<Object> receiver, | |
9255 Handle<Object> pat, Handle<Object> position); | |
9256 | |
Franzi
2016/09/19 08:04:21
I don't like pat as variable name (even thought th
| |
9254 // String equality operations. | 9257 // String equality operations. |
9255 inline bool Equals(String* other); | 9258 inline bool Equals(String* other); |
9256 inline static bool Equals(Handle<String> one, Handle<String> two); | 9259 inline static bool Equals(Handle<String> one, Handle<String> two); |
9257 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); | 9260 bool IsUtf8EqualTo(Vector<const char> str, bool allow_prefix_match = false); |
9258 bool IsOneByteEqualTo(Vector<const uint8_t> str); | 9261 bool IsOneByteEqualTo(Vector<const uint8_t> str); |
9259 bool IsTwoByteEqualTo(Vector<const uc16> str); | 9262 bool IsTwoByteEqualTo(Vector<const uc16> str); |
9260 | 9263 |
9261 // Return a UTF8 representation of the string. The string is null | 9264 // Return a UTF8 representation of the string. The string is null |
9262 // terminated but may optionally contain nulls. Length is returned | 9265 // terminated but may optionally contain nulls. Length is returned |
9263 // in length_output if length_output is not a null pointer The string | 9266 // in length_output if length_output is not a null pointer The string |
(...skipping 1961 matching lines...) Expand 10 before | Expand all | Expand 10 after Loading... | |
11225 } | 11228 } |
11226 return value; | 11229 return value; |
11227 } | 11230 } |
11228 }; | 11231 }; |
11229 | 11232 |
11230 | 11233 |
11231 } // NOLINT, false-positive due to second-order macros. | 11234 } // NOLINT, false-positive due to second-order macros. |
11232 } // NOLINT, false-positive due to second-order macros. | 11235 } // NOLINT, false-positive due to second-order macros. |
11233 | 11236 |
11234 #endif // V8_OBJECTS_H_ | 11237 #endif // V8_OBJECTS_H_ |
OLD | NEW |