public void applyStringDataType(String addressString, AbstractStringDataType dt, int n) {

		tx(() -> {

			Address address = addr(addressString);
			int previousDataLength = 0;
			for (int i = 0; i < n; i++) {
				address = address.addNoWrap(previousDataLength);
				Data newStringInstance = DataUtilities.createData(program, address, dt, -1,
					ClearDataMode.CLEAR_SINGLE_DATA);
				previousDataLength = newStringInstance.getLength();
			}
		});
	}
Creates a sting data type instance at the specified address, repeated {@code N} times.

@param addressString address.
@param dt {@link AbstractStringDataType} string type to place at address.
@param n repeat count.
Ghidra/Features/Base/src/main/java/ghidra/program/database/ProgramBuilder.java