Package net.minecraft.util
Class StringUtil
java.lang.Object
net.minecraft.util.StringUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic boolean
endsWithNewLine
(String string) static String
filterText
(String text) static String
filterText
(String text, boolean allowLineBreaks) static String
formatTickDuration
(int ticks, float ticksPerSecond) static boolean
isAllowedChatCharacter
(char character) static boolean
static boolean
isNullOrEmpty
(String string) Returns a value indicating whether the given string is null or empty.static boolean
isValidPlayerName
(String playerName) static boolean
isWhitespace
(int character) static int
static String
stripColor
(String text) static String
trimChatMessage
(String string) static String
truncateStringIfNecessary
(String string, int maxSize, boolean addEllipsis)
-
Field Details
-
STRIP_COLOR_PATTERN
-
LINE_PATTERN
-
LINE_END_PATTERN
-
-
Constructor Details
-
StringUtil
public StringUtil()
-
-
Method Details
-
formatTickDuration
-
stripColor
-
isNullOrEmpty
Returns a value indicating whether the given string is null or empty. -
truncateStringIfNecessary
-
lineCount
-
endsWithNewLine
-
trimChatMessage
-
isAllowedChatCharacter
public static boolean isAllowedChatCharacter(char character) -
isValidPlayerName
-
filterText
-
filterText
-
isWhitespace
public static boolean isWhitespace(int character) -
isBlank
-