Class StringDecomposer
java.lang.Object
net.minecraft.util.StringDecomposer
-
Field Summary
FieldsModifier and TypeFieldDescriptionprivate static final char -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionprivate static booleanfeedChar(Style style, FormattedCharSink output, int pos, char ch) static StringfilterBrokenSurrogates(String input) static StringgetPlainText(FormattedText input) static booleaniterate(String string, Style style, FormattedCharSink output) static booleaniterateBackwards(String string, Style style, FormattedCharSink output) static booleaniterateFormatted(String string, int offset, Style currentStyle, Style resetStyle, FormattedCharSink output) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(String string, int offset, Style style, FormattedCharSink output) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(String string, Style style, FormattedCharSink output) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(FormattedText component, Style rootStyle, FormattedCharSink output)
-
Field Details
-
REPLACEMENT_CHAR
private static final char REPLACEMENT_CHAR- See Also:
-
STOP_ITERATION
-
-
Constructor Details
-
StringDecomposer
public StringDecomposer()
-
-
Method Details
-
feedChar
-
iterate
-
iterateBackwards
-
iterateFormatted
Iterate a String while applying legacy formatting codes starting with a§sign. -
iterateFormatted
public static boolean iterateFormatted(String string, int offset, Style style, FormattedCharSink output) Iterate a String while applying legacy formatting codes starting with a§sign.- Parameters:
offset- The amount of characters to skip from the beginning.
-
iterateFormatted
public static boolean iterateFormatted(String string, int offset, Style currentStyle, Style resetStyle, FormattedCharSink output) Iterate a String while applying legacy formatting codes starting with a§sign.- Parameters:
offset- The amount of character to skip from the beginning.currentStyle- The current style at the starting position after the skip.resetStyle- The default style for the sequence that should be applied after a reset format code (§r)
-
iterateFormatted
public static boolean iterateFormatted(FormattedText component, Style rootStyle, FormattedCharSink output) -
filterBrokenSurrogates
-
getPlainText
-