I would like to get from lines such as this:
#define FACILITY_USERMODE_HYPERVISOR 53
to a line such as this, for use in an enum:
zFacilityUsermodeHypervisor = FACILITY_USERMODE_HYPERVISOR,
A quick regex replace does half the trick, is there a quick way to get the complete result?
Regex: #define (FACILITY_\w+)\s+(\d+)
Replace: $1 = $1,
This leaves me with
FACILITY_USERMODE_HYPERVISOR = FACILITY_USERMODE_HYPERVISOR,
How would I convert the first part to CamelCase?