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 pString) static String
filterText
(String pText) static String
filterText
(String pText, boolean pAllowLineBreaks) static String
formatTickDuration
(int pTicks, float pTicksPerSecond) static boolean
isAllowedChatCharacter
(char pCharacter) static boolean
static boolean
isNullOrEmpty
(String pString) Returns a value indicating whether the given string is null or empty.static boolean
isValidPlayerName
(String pPlayerName) static boolean
isWhitespace
(int p_331212_) static int
static String
stripColor
(String pText) static String
trimChatMessage
(String pString) static String
truncateStringIfNecessary
(String pString, int pMaxSize, boolean pAddEllipsis)
-
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 pCharacter) -
isValidPlayerName
-
filterText
-
filterText
-
isWhitespace
public static boolean isWhitespace(int p_331212_) -
isBlank
-