Make format engine a little bit more n00b friendly

This commit is contained in:
Reinhard Pointner 2016-03-24 11:13:44 +00:00
parent 920319120c
commit 564d11294d
1 changed files with 12 additions and 0 deletions

View File

@ -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;
}
}
}