LANG-1579: Improve stripAccents conversion of remaining accents
Single characters can be changed in place to avoid delete then insert. Closes #568
This commit is contained in:
parent
cf0bc2b5db
commit
dbe022e646
|
@ -52,6 +52,7 @@ The <action> type attribute can be add,update,fix,remove.
|
|||
<action type="update" dev="ggregory" due-to="Dependabot">Update spotbugs-maven-plugin from 4.0.0 to 4.0.4 #593.</action>
|
||||
<action type="update" dev="ggregory" due-to="Dependabot">Update biz.aQute.bndlib from 5.1.1 to 5.1.2 #592.</action>
|
||||
<action type="update" dev="ggregory" due-to="Dependabot">Update junit-pioneer from 0.6.0 to 0.7.0 #589.</action>
|
||||
<action issue="LANG-1579" type="update" dev="aherbert" due-to="XenoAmess">Improve stripAccents conversion of remaining accents.</action>
|
||||
</release>
|
||||
<release version="3.11" date="2020-07-12" description="New features and bug fixes.">
|
||||
<action type="update" dev="chtompki" due-to="Jin Xu">Refine test output for FastDateParserTest</action>
|
||||
|
|
|
@ -1382,11 +1382,9 @@ public class StringUtils {
|
|||
private static void convertRemainingAccentCharacters(final StringBuilder decomposed) {
|
||||
for (int i = 0; i < decomposed.length(); i++) {
|
||||
if (decomposed.charAt(i) == '\u0141') {
|
||||
decomposed.deleteCharAt(i);
|
||||
decomposed.insert(i, 'L');
|
||||
decomposed.setCharAt(i, 'L');
|
||||
} else if (decomposed.charAt(i) == '\u0142') {
|
||||
decomposed.deleteCharAt(i);
|
||||
decomposed.insert(i, 'l');
|
||||
decomposed.setCharAt(i, 'l');
|
||||
}
|
||||
}
|
||||
}
|
||||
|
|
Loading…
Reference in New Issue