Chromium Code Reviews
chromiumcodereview-hr@appspot.gserviceaccount.com (chromiumcodereview-hr) | Please choose your nickname with Settings | Help | Chromium Project | Gerrit Changes | Sign out
(2011)

Unified Diff: runtime/vm/object.h

Issue 8333001: Implement case mapping using the Unicode default case mapping algorithm. (Closed) Base URL: https://dart.googlecode.com/svn/branches/bleeding_edge/dart
Patch Set: Renamed result string variables. Created 9 years, 2 months ago
Use n/p to move between diff chunks; N/P to move between comments. Draft comments are only viewable by you.
Jump to:
View side-by-side diff with in-line comments
Download patch
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: runtime/vm/object.h
diff --git a/runtime/vm/object.h b/runtime/vm/object.h
index 240f3eddc5b5ab0dfaff519cf0a3577b67e23b7f..1ea941b164997d64f5f4d99a3ba8309f4e8e11e7 100644
--- a/runtime/vm/object.h
+++ b/runtime/vm/object.h
@@ -2364,6 +2364,15 @@ class String : public Instance {
intptr_t length,
Heap::Space space = Heap::kNew);
+ static RawString* Transform(int32_t (*mapping)(int32_t ch),
+ const String& str,
+ Heap::Space space = Heap::kNew);
+
+ static RawString* ToUpperCase(const String& str,
+ Heap::Space space = Heap::kNew);
+ static RawString* ToLowerCase(const String& str,
+ Heap::Space space = Heap::kNew);
+
static RawString* NewSymbol(const char* str);
template<typename T>
static RawString* NewSymbol(const T* characters, intptr_t len);
@@ -2435,6 +2444,10 @@ class OneByteString : public String {
intptr_t length,
Heap::Space space);
+ static RawOneByteString* Transform(int32_t (*mapping)(int32_t ch),
+ const String& str,
+ Heap::Space space);
+
private:
uint8_t* CharAddr(intptr_t index) const {
// TODO(iposva): Determine if we should throw an exception here.
@@ -2486,6 +2499,10 @@ class TwoByteString : public String {
intptr_t length,
Heap::Space space);
+ static RawTwoByteString* Transform(int32_t (*mapping)(int32_t ch),
+ const String& str,
+ Heap::Space space);
+
private:
uint16_t* CharAddr(intptr_t index) const {
ASSERT((index >= 0) && (index < Length()));
@@ -2533,6 +2550,10 @@ class FourByteString : public String {
intptr_t length,
Heap::Space space);
+ static RawFourByteString* Transform(int32_t (*mapping)(int32_t ch),
+ const String& str,
+ Heap::Space space);
+
private:
uint32_t* CharAddr(intptr_t index) const {
ASSERT((index >= 0) && (index < Length()));
« no previous file with comments | « runtime/vm/bootstrap_natives.h ('k') | runtime/vm/object.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698