Chromium Code Reviews| Index: runtime/vm/object.cc |
| =================================================================== |
| --- runtime/vm/object.cc (revision 15528) |
| +++ runtime/vm/object.cc (working copy) |
| @@ -10780,6 +10780,16 @@ |
| } |
| +RawOneByteString* OneByteString::New(const String& other, |
| + intptr_t other_start_index, |
| + intptr_t other_len, |
| + Heap::Space space) { |
| + const String& result = String::Handle(OneByteString::New(other_len, space)); |
| + String::Copy(result, 0, other, other_start_index, other_len); |
|
siva
2012/11/29 21:42:46
Could be written as:
ASSERT(other.IsOneByteString(
srdjan
2012/11/29 22:57:14
Done.
|
| + return OneByteString::raw(result); |
| +} |
| + |
| + |
| RawOneByteString* OneByteString::Concat(const String& str1, |
| const String& str2, |
| Heap::Space space) { |