From 564d11294d1b71b6160d3d1b5f065cd93823232e Mon Sep 17 00:00:00 2001 From: Reinhard Pointner Date: Thu, 24 Mar 2016 11:13:44 +0000 Subject: [PATCH] Make format engine a little bit more n00b friendly --- .../net/filebot/format/ExpressionFormatMethods.java | 12 ++++++++++++ 1 file changed, 12 insertions(+) diff --git a/source/net/filebot/format/ExpressionFormatMethods.java b/source/net/filebot/format/ExpressionFormatMethods.java index 0cb70252..a7436db6 100644 --- a/source/net/filebot/format/ExpressionFormatMethods.java +++ b/source/net/filebot/format/ExpressionFormatMethods.java @@ -422,4 +422,16 @@ public class ExpressionFormatMethods { return Locale.forLanguageTag(self); } + public static String plus(Object self, String value) { + return self.toString() + value; + } + + public static String plus(String self, Closure closure) { + try { + return self + closure.call(); + } catch (Exception e) { + return self; + } + } + }