diff options
author | Neil <nyamatongwe@gmail.com> | 2021-05-24 19:31:06 +1000 |
---|---|---|
committer | Neil <nyamatongwe@gmail.com> | 2021-05-24 19:31:06 +1000 |
commit | 92290868cf9753d2df0d494cb44e2ff62a570b58 (patch) | |
tree | 001e6cfce84372a03997de3138d630751ee8d38a /scripts/Face.py | |
parent | ee1886079d0a5cd350ee8e3379be347943ba93ae (diff) | |
download | scintilla-mirror-92290868cf9753d2df0d494cb44e2ff62a570b58.tar.gz |
Define C++ version of the Scintilla API in ScintillaTypes.h, ScintillaMessages.h
and ScintillaStructures.h using scoped enumerations.
Use these headers instead of Scintilla.h internally.
External definitions go in the Scintilla namespace and internal definitio0ns in
Scintilla::Internal.
Diffstat (limited to 'scripts/Face.py')
-rw-r--r-- | scripts/Face.py | 17 |
1 files changed, 17 insertions, 0 deletions
diff --git a/scripts/Face.py b/scripts/Face.py index 94451bc26..1559dfccd 100644 --- a/scripts/Face.py +++ b/scripts/Face.py @@ -41,6 +41,23 @@ def decodeParam(p): def IsEnumeration(t): return t[:1].isupper() +def PascalCase(s): + capitalized = s.title() + # Remove '_' except between digits + pascalCase = "" + characterPrevious = " " + # Loop until penultimate character + for i in range(len(capitalized)-1): + character = capitalized[i] + characterNext = capitalized[i+1] + if character != "_" or ( + characterPrevious.isnumeric() and characterNext.isnumeric()): + pascalCase += character + characterPrevious = character + # Add last character - not between digits so no special treatment + pascalCase += capitalized[-1] + return pascalCase + class Face: def __init__(self): |