Optimize repo updates

This commit is contained in:
topjohnwu
2018-05-06 02:51:23 +08:00
parent 90e4ac2d23
commit 8fd03f7434
7 changed files with 46 additions and 24 deletions
@@ -288,4 +288,13 @@ public class Utils {
public static String fmt(String fmt, Object... args) {
return String.format(Locale.US, fmt, args);
}
public static String dos2unix(String s) {
String newString = s.replace("\r\n", "\n");
if(!newString.endsWith("\n")) {
return newString + "\n";
} else {
return newString;
}
}
}