CLASS net/minecraft/class_3544 net/minecraft/util/StringHelper COMMENT Contains string-related helper methods. FIELD field_15771 FORMATTING_CODE Ljava/util/regex/Pattern; FIELD field_29204 LINE_BREAK Ljava/util/regex/Pattern; FIELD field_33559 ENDS_WITH_LINE_BREAK Ljava/util/regex/Pattern; METHOD method_15438 isEmpty (Ljava/lang/String;)Z COMMENT {@return true if {@code text} is {@code null} or empty, false otherwise} ARG 0 text METHOD method_15439 formatTicks (IF)Ljava/lang/String; COMMENT {@return the length of the {@code tick} in the MM:SS format, where COMMENT the MM is the minutes and SS is the seconds (optionally zero-padded)} ARG 0 ticks ARG 1 tickRate METHOD method_15440 stripTextFormat (Ljava/lang/String;)Ljava/lang/String; COMMENT {@return the {@code text} with all formatting codes removed} COMMENT COMMENT

A formatting code is the character {@code §} followed by COMMENT a numeric character or a letter A to F, K to O, or R. COMMENT COMMENT @see Formatting#strip ARG 0 text METHOD method_34238 countLines (Ljava/lang/String;)I COMMENT {@return the number of linebreaks in {@code text}} COMMENT COMMENT

A linebreak is either a CRLF sequence or a vertical tab (U+000B). ARG 0 text METHOD method_34963 truncate (Ljava/lang/String;IZ)Ljava/lang/String; COMMENT {@return {@code text} truncated to at most {@code maxLength} characters, COMMENT optionally with ellipsis} ARG 0 text ARG 1 maxLength ARG 2 addEllipsis METHOD method_36358 endsWithLineBreak (Ljava/lang/String;)Z COMMENT {@return true if {@code text} ends with a linebreak, false otherwise} COMMENT COMMENT

A linebreak is either a CRLF sequence or a vertical tab (U+000B). ARG 0 text METHOD method_43681 truncateChat (Ljava/lang/String;)Ljava/lang/String; COMMENT {@return {@code text} truncated to at most 256 characters without ellipsis} COMMENT COMMENT @apiNote This is used when sending chat messages. ARG 0 text METHOD method_57175 isValidChar (C)Z COMMENT {@return whether {@code c} is a valid character} COMMENT COMMENT

Characters are valid if they are not an ASCII control code or {@code §}. ARG 0 c METHOD method_57176 isWhitespace (I)Z ARG 0 c METHOD method_57177 stripInvalidChars (Ljava/lang/String;Z)Ljava/lang/String; COMMENT {@return {@code string} with all {@linkplain #isValidChar invalid characters} COMMENT removed} ARG 0 string ARG 1 allowLinebreak METHOD method_57178 (I)Z ARG 0 c METHOD method_57179 isValidPlayerName (Ljava/lang/String;)Z ARG 0 name METHOD method_57180 stripInvalidChars (Ljava/lang/String;)Ljava/lang/String; COMMENT {@return {@code string} with all {@linkplain #isValidChar invalid characters}, COMMENT including linebreak ({@code \\n}), removed} ARG 0 string METHOD method_57181 isBlank (Ljava/lang/String;)Z ARG 0 string