Re: Feature Request for builtin "replace"

2019-10-22 Thread Barrie Selack
Michael,

Could you use remove_begining and remove_ending?

https://freemarker.apache.org/docs/ref_builtins_string.html#ref_builtin_remove_ending

Barrie



On Tue, Oct 22, 2019 at 10:31 AM Riehemann, Michael <
michael.riehem...@coremedia.com> wrote:

> Hello,
>
> I have a Feature Request for the string built-in "replace".
>
> This built-in has some additional flags, see
> https://freemarker.apache.org/docs/ref_builtins_string.html#ref_builtin_string_flags
>
> Example:
> We have string, in which we want to remove the first and last appearance
> of a substring.
> The first one is possible, but not the last one. Or do I miss something
> here?
>
> Code:
> <#assign testString="start some text start end some more lines end again"
> />
> ${testString?replace("start", "", "f")} = some text start end some more
> lines end again
>
> It would be nice to have a flag "l" to get the last one.
> ${testString?replace("end", "", "l")} = start some text start end some
> more lines again
>
>
> What do you think?
>
> Thanks in advance,
>
> Michael Riehemann
>


Re: FM3: Increasing minimum Java version to 8

2019-08-04 Thread Barrie Selack
I say go for it.

On Sun, Aug 4, 2019 at 4:04 PM Daniel Dekany  wrote:

> I would like to increase the minimum Java version in the FreeMarker *3*
> branch to 8, because by the time it will be released, I assume it won't be
> a problem on Android anymore (I guess it's not a problem anymore nowadays
> either). This simplifies module structure and packaging.
>