|
|
@ -266,17 +266,11 @@ public final class StringUtil { |
|
|
|
return null; |
|
|
|
return null; |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
String[] elements = s.split("_"); |
|
|
|
List<String> elements = new ArrayList<>(Arrays.asList(s.split("_", 3))); |
|
|
|
switch (elements.length) { |
|
|
|
while (elements.size() < 3) { |
|
|
|
case 0: |
|
|
|
elements.add(""); |
|
|
|
return new Locale(s, "", ""); |
|
|
|
|
|
|
|
case 1: |
|
|
|
|
|
|
|
return new Locale(elements[0], "", ""); |
|
|
|
|
|
|
|
case 2: |
|
|
|
|
|
|
|
return new Locale(elements[0], elements[1], ""); |
|
|
|
|
|
|
|
default: |
|
|
|
|
|
|
|
return new Locale(elements[0], elements[1], elements[2]); |
|
|
|
|
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
return new Locale(elements.get(0), elements.get(1), elements.get(2)); |
|
|
|
} |
|
|
|
} |
|
|
|
|
|
|
|
|
|
|
|
/** |
|
|
|
/** |
|
|
|