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 boolean
feedChar
(Style pStyle, FormattedCharSink pSink, int pPosition, char pCharacter) static String
filterBrokenSurrogates
(String pText) static String
getPlainText
(FormattedText pText) static boolean
iterate
(String pText, Style pStyle, FormattedCharSink pSink) static boolean
iterateBackwards
(String pText, Style pStyle, FormattedCharSink pSink) 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.static boolean
iterateFormatted
(String pText, int pSkip, Style pStyle, FormattedCharSink pSink) Iterate a String while applying legacy formatting codes starting with a§
sign.static boolean
iterateFormatted
(String pText, Style pStyle, FormattedCharSink pSink) Iterate a String while applying legacy formatting codes starting with a§
sign.static boolean
iterateFormatted
(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
-