We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent e492353 commit 0e1027cCopy full SHA for 0e1027c
1 file changed
app/src/main/java/io/github/yawnoc/utilities/Stringy.java
@@ -118,12 +118,10 @@ public static List<String> toCharacterList(final String string)
118
final int codePointCount = string.codePointCount(0, string.length());
119
for (int codePointIndex = 0; codePointIndex < codePointCount; codePointIndex++)
120
{
121
- characters.add(
122
- string.substring(
123
- string.offsetByCodePoints(0, codePointIndex),
124
- string.offsetByCodePoints(0, codePointIndex + 1)
125
- )
126
- );
+ final int startIndex = string.offsetByCodePoints(0, codePointIndex);
+ final int endIndex = string.offsetByCodePoints(0, codePointIndex + 1);
+ final String character = string.substring(startIndex, endIndex);
+ characters.add(character);
127
}
128
129
return characters;
0 commit comments