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

Unified Diff: Source/bindings/scripts/unstable/v8_utilities.py

Issue 36793003: IDL compiler: constructor attributes (Closed) Base URL: svn://svn.chromium.org/blink/trunk
Patch Set: Rebased Created 7 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 | « Source/bindings/scripts/unstable/v8_types.py ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »
Expand Comments ('e') | Collapse Comments ('c') | Show Comments Hide Comments ('s')
Index: Source/bindings/scripts/unstable/v8_utilities.py
diff --git a/Source/bindings/scripts/unstable/v8_utilities.py b/Source/bindings/scripts/unstable/v8_utilities.py
index a22e43554bb6d6746c51718e73bc762c6f7be002..a741d8eb8da6f95331b4695b5788c3d1caf16cf1 100644
--- a/Source/bindings/scripts/unstable/v8_utilities.py
+++ b/Source/bindings/scripts/unstable/v8_utilities.py
@@ -62,6 +62,12 @@ def capitalize(name):
return name[0].upper() + name[1:]
+def strip_suffix(string, suffix):
+ if not suffix or not string.endswith(suffix):
+ return string
+ return string[:-len(suffix)]
+
+
def uncapitalize(name):
"""Uncapitalizes first letter or initial acronym (* with some exceptions).
« no previous file with comments | « Source/bindings/scripts/unstable/v8_types.py ('k') | Source/bindings/templates/interface.cpp » ('j') | no next file with comments »

Powered by Google App Engine
This is Rietveld 408576698