private boolean consumeNullTerms() {
		try {
			if (memory.getByte(addrs.getMinAddress()) == 0) {
				int bytesRead;
				while (!addrs.isEmpty() && !monitor.isCancelled() &&
					(bytesRead = memory.getBytes(addrs.getMinAddress(), buffer, 0,
						(int) Math.min(buffer.length, addrs.getFirstRange().getLength()))) > 0) {

					int nonNullIndex;
					for (nonNullIndex = 0; nonNullIndex < bytesRead; nonNullIndex++) {
						if (buffer[nonNullIndex] != 0) {
							nonNullIndex -= nonNullIndex % charSize;
							break;
						}
					}
					if (nonNullIndex > 0) {
						addrs.deleteFromMin(addrs.getMinAddress().add(nonNullIndex - 1));
					}
					if (nonNullIndex < bytesRead) {
						break;
					}
				}
			}
		}
		catch (MemoryAccessException e) {
			// terminate loop/method
		}
		if (singleStringStart != null &&
			Math.abs(singleStringStart.subtract(addrs.getMinAddress())) >= charAlignment) {
			return false;
		}
		return true;
	}
Creates a new UndefinedStringIterator instance.

@param program {@link Program}
@param addrs set of {@link Address}es to search.
@param charSize size of the characters (and the null-terminator) that make up the string
@param charAlignment alignment requirements for the start of the string 
@param breakOnRef boolean flag, if true strings will be terminated early at locations that
have an in-bound memory reference
@param singleStringMode boolean flag, if true only one string will be returned, and it must
be located at the start of the specified address set (after alignment tweaks)
@param stringDataType a string data type that corresponds to the type of string being
searched for
@param stringSettings {@link Settings} for the string data type
@param monitor {@link TaskMonitor}
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/strings/UndefinedStringIterator.java