format方法格式化

赵嘉伟 4 years ago
parent e75396aaaa
commit ec25f7bd45

@ -179,6 +179,8 @@ public class StringUtils {
return message;
}
static public String format(String message, Object... args)
{
if( message.length() <= 0 ) return message;
@ -201,7 +203,7 @@ public class StringUtils {
String key = map.getKey();
String value = map.getValue();
String keyStr = '%' + key + '%';
String keyStr = '#' + key + '#';
if (message.contains(keyStr)) {
message = message.replace(keyStr, value);
}

Loading…
Cancel
Save