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 style, FormattedCharSink sink, int position, char character) static String
filterBrokenSurrogates
(String text) static String
getPlainText
(FormattedText text) static boolean
iterate
(String text, Style style, FormattedCharSink sink) static boolean
iterateBackwards
(String text, Style style, FormattedCharSink sink) 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.static boolean
iterateFormatted
(String text, int skip, Style style, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§
sign.static boolean
iterateFormatted
(String text, Style style, FormattedCharSink sink) Iterate a String while applying legacy formatting codes starting with a§
sign.static boolean
iterateFormatted
(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
-