code: private static boolean isIn(char c, char[] chars) {
  
      if (chars != null) {
        for (char current : chars) {
          if (current == c) {
            return true;
          }
        }
      }
      return false;
    }
docs: This method determines if the given character {@code c} is contained in {@code chars}.
  
  @param c is the character to check.
  @param chars is the array with the matching characters.
  @return {@code true} if {@code c} is contained in {@code chars}, {@code false} otherwise.