1
0
mirror of https://github.com/mitb-archive/filebot synced 2024-12-22 15:58:52 -05:00

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

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();
}