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

Unified Diff: src/objects.h

Issue 2018963002: [builtins] Migrate String.prototype.trim/trimLeft/trimRight to C++. (Closed) Base URL: https://chromium.googlesource.com/v8/v8.git@master
Patch Set: Address Franziskas comments. Created 4 years, 7 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 | « src/js/string.js ('k') | src/objects.cc » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: src/objects.h
diff --git a/src/objects.h b/src/objects.h
index 24436f735ce89141de45a18086f18b1d4c646d67..d640ced23688e6659f56cf92aca726c3f46b923e 100644
--- a/src/objects.h
+++ b/src/objects.h
@@ -8860,6 +8860,10 @@ class String: public Name {
// Conversion.
inline bool AsArrayIndex(uint32_t* index);
+ // Trimming.
+ enum TrimMode { kTrim, kTrimLeft, kTrimRight };
+ static Handle<String> Trim(Handle<String> string, TrimMode mode);
+
DECLARE_CAST(String)
void PrintOn(FILE* out);
« no previous file with comments | « src/js/string.js ('k') | src/objects.cc » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698