no message
This commit is contained in:
@@ -6,6 +6,9 @@ import org.apache.commons.io.FileUtils;
|
||||
|
||||
import java.io.File;
|
||||
import java.nio.charset.Charset;
|
||||
import java.util.Arrays;
|
||||
import java.util.Vector;
|
||||
import java.util.stream.Collectors;
|
||||
public class CommonUtils {
|
||||
//JSON
|
||||
//--
|
||||
@@ -243,6 +246,16 @@ public class CommonUtils {
|
||||
}
|
||||
return (cc == 0);
|
||||
}
|
||||
public static String removeRedundantSpaces(String s_in) {
|
||||
return String.join(" ",
|
||||
Arrays.stream(s_in.split(" ")).filter(d -> !d.isEmpty()).collect(Collectors.toCollection(Vector::new)));
|
||||
}
|
||||
public static String removeCharacters(String string, String... to_remove) {
|
||||
String res = string;
|
||||
for (String c : to_remove)
|
||||
res = res.replace(c, "");
|
||||
return res;
|
||||
}
|
||||
//ФАЙЛЫ
|
||||
public static String getExtension(File file) {
|
||||
String fn = file.getName();
|
||||
|
||||
Reference in New Issue
Block a user