1
0
mirror of https://github.com/mitb-archive/filebot synced 2025-03-10 06:20:27 -04:00

Added String.isLatin()

@see https://www.filebot.net/forums/viewtopic.php?f=5&t=2&p=28963#p28963
This commit is contained in:
Reinhard Pointner 2017-06-21 09:19:14 +08:00
parent 395ec3a4b8
commit a28d2e4ccf

View File

@ -398,7 +398,7 @@ public class ExpressionFormatMethods {
} }
public static boolean isLatin(String self) { public static boolean isLatin(String self) {
return Normalizer.normalize(self, Normalizer.Form.NFD).replaceAll("\\p{InCombiningDiacriticalMarks}", "").matches("^\\p{InBasicLatin}+$"); return Normalizer.normalize(self, Normalizer.Form.NFD).replaceAll("\\p{InCombiningDiacriticalMarks}", "").matches("\\p{InBasicLatin}+");
} }
/** /**