public static String convertEscapeSequences(String str) {
		StringBuilder builder = new StringBuilder();

		int inputLength = str.length();
		int index = 0;
		while (index < inputLength) {
			String subOfInput = (index + 2 <= inputLength) ? str.substring(index, index + 2)
					: str.substring(index, inputLength);
			Character escapeChar = escapeStringToControlMap.get(subOfInput);
			if (escapeChar != null) {
				builder.append(escapeChar);
				index += 2;
			}
			else if (handleEscapeSequence(str, "\\x", 2, index, builder)) {
				index += 4;
			}
			else if (handleEscapeSequence(str, "\\u", 4, index, builder)) {
				index += 6;
			}
			else if (handleEscapeSequence(str, "\\U", 8, index, builder)) {
				index += 10;
			}
			else {
				builder.append(str.charAt(index));
				index++;
			}
		}
		return builder.toString();
	}
Replaces escaped characters in a string to corresponding control characters. For example a
string containing a backslash character followed by a 'n' character would be replaced with a
single line feed (0x0a) character. One use for this is to allow users to type strings in a
text field and include control characters such as line feeds and tabs.

The string that contains 'a','b','c', '\', 'n', 'd', '\', 'u', '0', '0', '0', '1', 'e' would
become 'a','b','c',0x0a,'d', 0x01, e"

@param str The string to convert escape sequences to control characters.
@return a new string with escape sequences converted to control characters.
@see #convertEscapeSequences(String string)
Ghidra/Framework/Generic/src/main/java/ghidra/util/StringUtilities.java