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
|
|
@ -4,9 +4,12 @@ using rename_pcre_encoderNamespace;
|
|||
public class runme {
|
||||
static void Main() {
|
||||
SomeWidget w = new SomeWidget();
|
||||
w.putBorderWidth(17);
|
||||
if ( w.getBorderWidth() != 17 )
|
||||
w.put_borderWidth(17);
|
||||
if ( w.get_borderWidth() != 17 )
|
||||
throw new Exception(String.Format("Border with should be 17, not {0}",
|
||||
w.getBorderWidth()));
|
||||
w.get_borderWidth()));
|
||||
|
||||
if ( rename_pcre_encoder.StartINSAneAndUNSAvoryTraNSAtlanticRaNSAck() != 42 )
|
||||
throw new Exception("Unexpected result of renamed function call");
|
||||
}
|
||||
}
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue