Package net.minecraft.util
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 sink, int position, char character) static StringfilterBrokenSurrogates(String text) static StringgetPlainText(FormattedText text) static booleaniterate(String text, Style style, FormattedCharSink sink) static booleaniterateBackwards(String text, Style style, FormattedCharSink sink) static booleaniterateFormatted(String text, int skip, Style currentStyle, Style defaultStyle, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(String text, int skip, Style style, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(String text, Style style, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(FormattedText text, Style style, FormattedCharSink sink)
-
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
Iterate a String while applying legacy formatting codes starting with a§sign.- Parameters:
skip- The amount of characters to skip from the beginning.
-
iterateFormatted
public static boolean iterateFormatted(String text, int skip, Style currentStyle, Style defaultStyle, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§sign.- Parameters:
skip- The amount of character to skip from the beginning.currentStyle- The current style at the starting position after the skip.defaultStyle- The default style for the sequence that should be applied after a reset format code (§r)
-
iterateFormatted
-
filterBrokenSurrogates
-
getPlainText
-