MCPcopy Create free account
hub / github.com/capstone-engine/capstone / pascalize_const

Function pascalize_const

bindings/const_generator.py:171–179  ·  view source on GitHub ↗
(name)

Source from the content-addressed store, hash-verified

169 return ''.join(map(str.capitalize, parts))
170
171def pascalize_const(name):
172 parts = name.split('_',2)
173 match = re.match('^(CC|DISP|MOD|DIR|BCAST|RM|FLAGS|SIZE|BR_DISP_SIZE)_', parts[2])
174 if match:
175 parts = name.split('_', 2 + match.group(0).count('_'))
176 item = camelize(parts[-1])
177 if item[0].isdigit():
178 item = parts[-2].lower() + item
179 return (pascalize('_'.join(parts[0:-1])), item)
180
181def enum_type(name, templ):
182 for enum_type, pattern in templ['enum_types'].items():

Callers 1

genFunction · 0.85

Calls 5

camelizeFunction · 0.85
pascalizeFunction · 0.85
matchMethod · 0.45
countMethod · 0.45
groupMethod · 0.45

Tested by

no test coverage detected

Used in the wild real call sites across dependent graphs

searching dependent graphs…