code: public static String removeFirstAndLastChar(String text) {
          Preconditions.checkNotNull(text, "text can not be null");
          int n = text.length();
          return text.substring(1, n - 1);
      }
docs: Remove first and last character from given string and return result.
  
  @param text given string
  
  @return substring of given string - without first and last characters