mirror of
https://github.com/mitb-archive/filebot
synced 2024-11-02 08:25:02 -04:00
Cache Pattern instance
This commit is contained in:
parent
c41f564832
commit
158119a26b
@ -620,12 +620,14 @@ public final class FileUtilities {
|
||||
return path.replace('\\', '/');
|
||||
}
|
||||
|
||||
private static final Pattern PATH_SEPARATORS = Pattern.compile("\\s*[\\\\/]+\\s*");
|
||||
|
||||
public static String replacePathSeparators(CharSequence path) {
|
||||
return replacePathSeparators(path, " ");
|
||||
}
|
||||
|
||||
public static String replacePathSeparators(CharSequence path, String replacement) {
|
||||
return Pattern.compile("\\s*[\\\\/]+\\s*").matcher(path).replaceAll(replacement);
|
||||
return PATH_SEPARATORS.matcher(path).replaceAll(replacement);
|
||||
}
|
||||
|
||||
public static String md5(String string) {
|
||||
|
Loading…
Reference in New Issue
Block a user