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 pStyle, FormattedCharSink pSink, int pPosition, char pCharacter) static StringfilterBrokenSurrogates(String pText) static StringgetPlainText(FormattedText pText) static booleaniterate(String pText, Style pStyle, FormattedCharSink pSink) static booleaniterateBackwards(String pText, Style pStyle, FormattedCharSink pSink) static booleaniterateFormatted(String pText, int pSkip, Style pCurrentStyle, Style pDefaultStyle, FormattedCharSink pSink) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(String pText, int pSkip, Style pStyle, FormattedCharSink pSink) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(String pText, Style pStyle, FormattedCharSink pSink) Iterate a String while applying legacy formatting codes starting with a§sign.static booleaniterateFormatted(FormattedText pText, Style pStyle, FormattedCharSink pSink)
-
Field Details
-
REPLACEMENT_CHAR
private static final char REPLACEMENT_CHAR- See Also:
-
STOP_ITERATION
-
-
Constructor Details
-
StringDecomposer
public StringDecomposer()
-
-
Method Details
-
feedChar
private static boolean feedChar(Style pStyle, FormattedCharSink pSink, int pPosition, char pCharacter) -
iterate
-
iterateBackwards
-
iterateFormatted
Iterate a String while applying legacy formatting codes starting with a§sign. -
iterateFormatted
public static boolean iterateFormatted(String pText, int pSkip, Style pStyle, FormattedCharSink pSink) Iterate a String while applying legacy formatting codes starting with a§sign.- Parameters:
pSkip- The amount of characters to skip from the beginning.
-
iterateFormatted
public static boolean iterateFormatted(String pText, int pSkip, Style pCurrentStyle, Style pDefaultStyle, FormattedCharSink pSink) Iterate a String while applying legacy formatting codes starting with a§sign.- Parameters:
pSkip- The amount of character to skip from the beginning.pCurrentStyle- The current style at the starting position after the skip.pDefaultStyle- The default style for the sequence that should be applied after a reset format code (§r)
-
iterateFormatted
-
filterBrokenSurrogates
-
getPlainText
-