Class StringUtil
java.lang.Object
net.minecraft.util.StringUtil
-
Field Summary
Fields -
Constructor Summary
Constructors -
Method Summary
Modifier and TypeMethodDescriptionstatic booleanstatic StringfilterText(String input) static StringfilterText(String input, boolean multiline) static StringformatTickDuration(int ticks, float tickrate) static booleanisAllowedChatCharacter(int ch) static booleanstatic booleanisNullOrEmpty(@Nullable String s) Returns a value indicating whether the given string is null or empty.static booleanisValidPlayerName(String name) static booleanisWhitespace(int codepoint) static intstatic StringstripColor(String input) static StringtrimChatMessage(String message) static StringtruncateStringIfNecessary(String s, int maxLength, boolean addDotDotDotIfTruncated)
-
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(int ch) -
isValidPlayerName
-
filterText
-
filterText
-
isWhitespace
public static boolean isWhitespace(int codepoint) -
isBlank
-