Package net.minecraft.util
Class StringUtil
java.lang.Object
net.minecraft.util.StringUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanendsWithNewLine(String string) static StringfilterText(String text) static StringfilterText(String text, boolean allowLineBreaks) static StringformatTickDuration(int ticks, float ticksPerSecond) static booleanisAllowedChatCharacter(char character) static booleanstatic booleanisNullOrEmpty(String string) Returns a value indicating whether the given string is null or empty.static booleanisValidPlayerName(String playerName) static booleanisWhitespace(int character) static intstatic StringstripColor(String text) static StringtrimChatMessage(String string) static StringtruncateStringIfNecessary(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
-