Add support for case conversion characters in regex substitutions.
Allow using Perl-like \l, \L, \u, \U and \E escape sequences in the
substitution string used with %rename("%(regex:/pattern/subst/)s").
This is useful for e.g. title casing all string after removing some prefix.
Closes #82
This commit is contained in:
parent
669a27bb7b
commit
72afb74f47
7 changed files with 108 additions and 21 deletions
|
|
@ -1,13 +1,16 @@
|
|||
from rename_pcre_encoder import *
|
||||
|
||||
s = SomeWidget()
|
||||
s.putBorderWidth(3)
|
||||
if s.getBorderWidth() != 3:
|
||||
raise RuntimeError("Border should be 3, not %d" % (s.getBorderWidth(),))
|
||||
s.put_borderWidth(3)
|
||||
if s.get_borderWidth() != 3:
|
||||
raise RuntimeError("Border should be 3, not %d" % (s.get_borderWidth(),))
|
||||
|
||||
s.putSize(4, 5)
|
||||
s.put_size(4, 5)
|
||||
a = AnotherWidget()
|
||||
a.DoSomething()
|
||||
|
||||
evt = wxEVTSomeEvent()
|
||||
t = xUnchangedName()
|
||||
|
||||
if StartINSAneAndUNSAvoryTraNSAtlanticRaNSAck() != 42:
|
||||
raise RuntimeError("Unexpected result of renamed function call")
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue