I don't want to spark off any arguments but was there any real strong reason
why it wasn't kept within commons.lang or at least moved to another package?

As you rightly suspected I don't want to add another dependancy as I'm using
this method in production.
I've had to add the method to our own string utils class :(  ( I think it's
relative)
I suppose it went through the deprecation process?? ;)

Regards,

Saimon

> -----Mensaje original-----
> De:   Henri Yandell [SMTP:[EMAIL PROTECTED]]
> Enviado el:   jueves 16 de enero de 2003 18:21
> Para: Jakarta Commons Developers List
> Asunto:       Re: Where has commons lang Strings.interpolate(String text,
> Map map) gone?
> 
> 
> Yeah, they wouldn't let me keep it :(
> 
> The method is in com.generationjava.util.Interpolator
> [http://www.generationjava.com/projects/GenJavaCore.shtml], or, as you
> probably won't want more dependencies, [and as GJ uses Namespace not Map]
> it ought to just be:
> 
>     static public String interpolate(String text, Map namespace) {
>         Iterator keys = namespace.keySet().iterator();
>         while(keys.hasNext()) {
>             String key = keys.next().toString();
>             Object obj = namespace.get(key);
>             String value = obj.toString();
>             text = StringUtils.replace(text, "${"+key+"}", value);
>             if(key.indexOf(" ") == -1) {
>                 text = StringUtils.replace(text, "$"+key, value);
>             }
>         }
>         return text;
>     }
> 
> Hope that helps,
> 
> Hen
> 
> On Thu, 16 Jan 2003 [EMAIL PROTECTED] wrote:
> 
> > This method was removed for 1.0 due to its specific nature.
> >
> > Sorry.
> >
> > Stephen
> >
> > >  from:    Simon Moore <[EMAIL PROTECTED]>
> > >  date:    Thu, 16 Jan 2003 11:10:59
> > >  to:      [EMAIL PROTECTED]
> > >  subject: Re: Where has commons lang Strings.interpolate(String text,
> Map map)  gone?
> > >
> > > > I've been cleaning up some alod code dependant on commons-lang
> 0.1-dev to
> > > > depend on commons-lang 1.0 but I'm missing the
> > > > Strings.interpolate(String text, Map map) in StringUtils???
> > > >
> > > > Does anyone know where it went?
> > > >
> > > > Regards,
> > > >
> > > >  Saimon
> > > >
> > > >
> > >
> > > --
> > > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > >
> >
> >
> > --
> > To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> > For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>
> >
> >
> 
> 
> --
> To unsubscribe, e-mail:
> <mailto:[EMAIL PROTECTED]>
> For additional commands, e-mail:
> <mailto:[EMAIL PROTECTED]>

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

Reply via email to