private String replaceInvalidAscii(String string) {

		char[] stringChars = scoredString.toCharArray();
		char[] asciiStringChars = new char[stringChars.length];

		StringBuilder bad = new StringBuilder();
		for (int i = 0; i < stringChars.length; i++) {
			char currentChar = stringChars[i];

			// If character is not ASCII, replace with space
			if ((currentChar >= 0) && (currentChar <= 127)) {
				asciiStringChars[i] = stringChars[i];
			}
			else {
				bad.append(Character.digit(stringChars[i], 10)).append(' ');
				asciiStringChars[i] = ' ';
			}
		}

		Msg.debug(this, "Warning: found non-ASCII character(s) while analyzing '" + scoredString +
			"' --replacing with space characters during analysis.  Char values: " + bad);

		return new String(asciiStringChars);
	}
Storage class for Strings identified by the String Searcher and their associated
ngram scores.  The scores, combined with the score thresholds, determine if this 
string passes or fails.
Ghidra/Features/Base/src/main/java/ghidra/app/plugin/core/string/StringAndScores.java