code: static String toChars(String p) {
        if (p.length() >= 3 && p.charAt(0) == '[' && p.charAt(p.length() - 1) == ']') {
           return p.substring(1, p.length() - 1);
        }
        return p;
     }
docs: To chars string.
  
  @param p the p
  @return the string