Class StringUtils

java.lang.Object
net.minestom.server.utils.StringUtils

public class StringUtils extends Object
  • Field Details

  • Constructor Details

    • StringUtils

      public StringUtils()
  • Method Details

    • countMatches

      public static int countMatches(@NotNull @NotNull CharSequence str, char ch)
    • jaroWinklerScore

      public static double jaroWinklerScore(String s1, String s2)
      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

      public static String unescapeJavaString(String st)