public String toQuoted(int maxLength) {
    String string = toHuman();
    int length = string.length();
    String ellipses;

    if (length <= (maxLength - 2)) {
      ellipses = "";
    } else {
      string = string.substring(0, maxLength - 5);
      ellipses = "...";
    }

    return '\"' + string + ellipses + '\"';
  }
Gets the value as a human-oriented string, surrounded by double quotes, but ellipsizes the
result if it is longer than the given maximum length

@param maxLength {@code >= 5;} the maximum length of the string to return
@return {@code non-null;} the quoted string
android/android_framework/dex-maker/src/main/java/com/android/dx/rop/cst/CstString.java