Index: Source/build/scripts/name_utilities.py |
diff --git a/Source/build/scripts/name_utilities.py b/Source/build/scripts/name_utilities.py |
index cb677c52406061bfbef38286b048086d8e03e680..2df84622fc7f5810f78f4b32af88b53065132801 100644 |
--- a/Source/build/scripts/name_utilities.py |
+++ b/Source/build/scripts/name_utilities.py |
@@ -44,6 +44,13 @@ def lower_first(name): |
return name[0].lower() + name[1:] |
+def upper_first(name): |
+ for acronym in ACRONYMS: |
+ if name.startswith(acronym.lower()): |
+ return name.replace(acronym.lower(), acronym) |
+ return name[0].upper() + name[1:] |
+ |
+ |
def to_macro_style(name): |
s1 = re.sub('(.)([A-Z][a-z]+)', r'\1_\2', name) |
return re.sub('([a-z0-9])([A-Z])', r'\1_\2', s1).upper() |