no message
This commit is contained in:
@@ -37,7 +37,6 @@ import java.util.*;
|
||||
import java.util.concurrent.Semaphore;
|
||||
import java.util.regex.Matcher;
|
||||
import java.util.regex.Pattern;
|
||||
import java.util.stream.Collectors;
|
||||
import java.util.stream.IntStream;
|
||||
public class Utils {
|
||||
public static boolean isLinuxSystemCommand(String text) {
|
||||
@@ -211,16 +210,6 @@ public class Utils {
|
||||
public static String getRelativeAddress(File file, File anchestor) {
|
||||
return file.getAbsolutePath().substring(anchestor.getAbsolutePath().length() + 1);
|
||||
}
|
||||
public static String pack(String s_in) {
|
||||
return String.join(" ",
|
||||
Arrays.stream(s_in.split(" ")).filter(d -> !d.isEmpty()).collect(Collectors.toCollection(Vector::new)));
|
||||
}
|
||||
public static String remove(String string, String... to_remove) {
|
||||
String res = string;
|
||||
for (String c : to_remove)
|
||||
res = res.replace(c, "");
|
||||
return res;
|
||||
}
|
||||
//для переименования/добавления новых файлов.
|
||||
public static boolean validateFileShortNewName(String name, TextLog Log) {
|
||||
boolean res = true;
|
||||
@@ -556,7 +545,7 @@ public class Utils {
|
||||
try {
|
||||
for (String line : FileUtils.readLines(test, Charset.defaultCharset())) {
|
||||
// #pragma dvm array distribute[block][block], не важно
|
||||
String packedLine = remove(pack(line).toLowerCase(), "\n", "\r", "\t");
|
||||
String packedLine = CommonUtils.removeCharacters(CommonUtils.removeRedundantSpaces(line).toLowerCase(), "\n", "\r", "\t");
|
||||
if (packedLine.startsWith(prefix)) {
|
||||
packedLine = packedLine.substring(prefix.length());
|
||||
boolean bracketOpen = false;
|
||||
@@ -942,8 +931,8 @@ public class Utils {
|
||||
line2 = line2.toUpperCase();
|
||||
}
|
||||
if (!Global.db.settings.get(SettingName.SpacesOn).toBoolean()) {
|
||||
line1 = remove(line1, " ", "\t");
|
||||
line2 = remove(line2, " ", "\t");
|
||||
line1 = CommonUtils.removeCharacters(line1, " ", "\t");
|
||||
line2 = CommonUtils.removeCharacters(line2, " ", "\t");
|
||||
}
|
||||
return line1.equals(line2);
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user