mirror of
https://github.com/tencentmusic/supersonic.git
synced 2025-12-11 12:07:42 +00:00
@@ -51,4 +51,21 @@ public class StringUtil {
|
||||
}
|
||||
return sql.replaceAll("`", "");
|
||||
}
|
||||
|
||||
public static String append(String old, String add) {
|
||||
return append(old, add, "\n");
|
||||
}
|
||||
|
||||
public static String append(String old, String add, String split) {
|
||||
if (StringUtils.isNotBlank(old)) {
|
||||
if (StringUtils.isNotBlank(add)) {
|
||||
return String.format("%s%s%s", old, split, add);
|
||||
}
|
||||
return old;
|
||||
}
|
||||
if (StringUtils.isNotBlank(add)) {
|
||||
return add;
|
||||
}
|
||||
return null;
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user