public static String whitespaceToUnderscores(String s) {
		if (s == null) {
			return null;
		}
		return s.trim().replaceAll("[\\x00-\\x20]", "_");
	}
Removes any whitespace from start or end of string, then replaces any non-printable
character (&lt; 32) or spaces (32) with an underscore.
@param s the string to adjust
@return a new trimmed string with underscores replacing any non-printable characters.
Ghidra/Framework/Generic/src/main/java/ghidra/util/StringUtilities.java