Class Util


  • public class Util
    extends Object
    • Constructor Detail

      • Util

        public Util()
    • Method Detail

      • commonChars

        public static double commonChars​(@NonNull
                                         @NonNull Locale locale,
                                         @NonNull
                                         @NonNull String input,
                                         @NonNull
                                         @NonNull String target)
        Returns the common chars of an input string compared to an target string. The logic works directional, so it's important to always compare to the same target and change the input
        Parameters:
        locale - the locale used to any string normalizations
        input - the input string to compare against the target
        target - the target string
        Returns:
        a value between 1 and 0, where 1 means all chars are common and 0 means no chars are common.