Code review

This commit is contained in:
Nick Goupinets 2021-02-17 09:42:00 -05:00
parent c4daefc9fb
commit 2ec906afb2
1 changed files with 1 additions and 8 deletions
hapi-fhir-base/src/main/java/ca/uhn/fhir/util

View File

@ -101,14 +101,7 @@ public class StringUtil {
return theString;
}
StringBuilder retVal = new StringBuilder();
for (int offset = 0; offset < theCodePointCount; ) {
int codePoint = theString.codePointAt(offset);
offset += Character.charCount(codePoint);
retVal.append(Character.toChars(codePoint));
}
return retVal.toString();
return theString.substring(0, theString.offsetByCodePoints(0, theCodePointCount));
}
}