Class AsciiUtil

java.lang.Object
pl.decerto.hyperon.runtime.helper.AsciiUtil

public class AsciiUtil extends Object
Fast method based on assumption that all characters are 7-bit ascii chars.
  • Method Details

    • equalsIgnoreCase

      public static boolean equalsIgnoreCase(String s1, String s2)
      fast compare 7-bit strings
      Parameters:
      s1 - not null
      s2 - not null
      Returns:
      boolean value from compare result
    • equalsIgnoreCase

      public static boolean equalsIgnoreCase(char c1, char c2)
      fast compare 7-bit chars
      Parameters:
      c1 - not null
      c2 - not null
      Returns:
      boolean value from compare result
    • isUppercaseLetter

      public static boolean isUppercaseLetter(char c)
      is [c] valid 7-bit upper letter
      Parameters:
      c - not null
      Returns:
      boolean value from compare result
    • lowercase

      public static String lowercase(String str)
      return lower cased [str] method is on average 2 times faster than String.toLowerCase()
      Parameters:
      str - String value
      Returns:
      lower cased [str]