Gary Gregory wrote:

> - (for me ;-) Provide an Interpolation feature that allows a simple way
> to use System properties to replace variables in a String. For me, this
> could be as simple as:
>
>    String s = XXX.resolveAll(source, "$", "{", "}",
> System.getProperties());

Maybe it is a bit of overkill, but you could use Velocity for this:

Velocity.init();
VelocityContext ctx = new VelocityContext(System.getProperties());
Template t = new Template(...);  // make a template from source
StringWriter sw = new StringWriter();
t.merge(ctx, sw);
String s = sw.toString();

Why reimplement something that already works quite well?

   michael


---------------------------------------------------------------------
To unsubscribe, e-mail: [EMAIL PROTECTED]
For additional commands, e-mail: [EMAIL PROTECTED]

Reply via email to