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:
Vadim Zeitlin 2013-08-30 17:01:01 +02:00 committed by William S Fulton
commit 72afb74f47
7 changed files with 108 additions and 21 deletions

View file

@ -6,9 +6,11 @@ public class rename_pcre_encoder_runme {
public static void main(String argv[])
{
SomeWidget w = new SomeWidget();
w.putBorderWidth(17);
if ( w.getBorderWidth() != 17 )
w.put_borderWidth(17);
if ( w.get_borderWidth() != 17 )
throw new RuntimeException(String.format("Border with should be 17, not %d",
w.getBorderWidth()));
w.get_borderWidth()));
if ( rename_pcre_encoder.StartINSAneAndUNSAvoryTraNSAtlanticRaNSAck() != 42 )
throw new RuntimeException("Unexpected result of renamed function call");
}
}