Package net.minestom.server.utils
Class StringUtils
java.lang.Object
net.minestom.server.utils.StringUtils
-
Field Summary
-
Constructor Summary
-
Method Summary
Modifier and TypeMethodDescriptionstatic int
countMatches
(@NotNull CharSequence str, char ch) static double
jaroWinklerScore
(String s1, String s2) Applies the Jaro-Winkler distance algorithm to the given strings, providing information about the similarity of them.static String
-
Field Details
-
SPACE
- See Also:
-
SPACE_CHAR
public static final char SPACE_CHAR- See Also:
-
-
Constructor Details
-
StringUtils
public StringUtils()
-
-
Method Details
-
countMatches
-
jaroWinklerScore
Applies the Jaro-Winkler distance algorithm to the given strings, providing information about the similarity of them.- Parameters:
s1
- The first string that gets compared. May be null or empty.s2
- The second string that gets compared. May be null or empty.- Returns:
- The Jaro-Winkler score (between 0.0 and 1.0), with a higher value indicating larger similarity.
-
unescapeJavaString
-