Support "guarded expressions" when concatting String values.

e.g. {"[" + {n} + " " + {s00e00} + "]"}

https://www.filebot.net/forums/viewtopic.php?f=8&t=10719
This commit is contained in:
Reinhard Pointner 2019-04-24 14:44:09 +07:00
parent 2911ea488a
commit 3f2a8ee5a6
1 changed files with 5 additions and 0 deletions

View File

@ -676,6 +676,11 @@ public class ExpressionFormatMethods {
return '-' + self;
}
public static String plus(String self, Closure closure) {
Object value = call(closure);
return value == null ? self : self + value;
}
private ExpressionFormatMethods() {
throw new UnsupportedOperationException();
}