private String getOffcutString(Data data, Address dataAddress, int diff, DataType dt) {
		if (StringDataInstance.isString(data)) {
			StringDataInstance string = StringDataInstance.getStringDataInstance(data);
			string = string.getByteOffcut(diff);
			return string.getStringRepresentation();
		}
		if (!data.hasStringValue()) {
			return null;
		}

		int length = data.getLength();
		if (diff >= length) {
			// not sure if this can happen--just use the default
			return data.getDefaultValueRepresentation();
		}

		DumbMemBufferImpl mb = new DumbMemBufferImpl(data.getMemory(), dataAddress.add(diff));
		return dt.getRepresentation(mb, data, length - diff);
	}
Returns the number of comments that can be added before reaching the maximum number of
comments
@return the number of comments
Ghidra/Features/Base/src/main/java/ghidra/app/util/EolComments.java