Make format engine a little bit more n00b friendly
This commit is contained in:
parent
920319120c
commit
564d11294d
|
@ -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;
|
||||
}
|
||||
}
|
||||
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue