ui: Index of char is faster than string
This commit is contained in:
@@ -67,7 +67,7 @@ public class TextComponent implements RenderableEntity
|
|||||||
for (String textSplitOnCol : parts)
|
for (String textSplitOnCol : parts)
|
||||||
{
|
{
|
||||||
final String textWithoutCol = textWithoutColTags(textSplitOnCol);
|
final String textWithoutCol = textWithoutColTags(textSplitOnCol);
|
||||||
final String colColor = textSplitOnCol.substring(textSplitOnCol.indexOf("=") + 1, textSplitOnCol.indexOf(">"));
|
final String colColor = textSplitOnCol.substring(textSplitOnCol.indexOf('=') + 1, textSplitOnCol.indexOf('>'));
|
||||||
|
|
||||||
renderText(graphics, x, position.y, textWithoutCol, Color.decode("#" + colColor), borderColor);
|
renderText(graphics, x, position.y, textWithoutCol, Color.decode("#" + colColor), borderColor);
|
||||||
|
|
||||||
|
|||||||
Reference in New Issue
Block a user