private static String visit(@Nullable String input, @Nonnull Visitor consumer) {
		if (input == null)
			return null;
		int len = input.length();
		int cursor = 0;
		StringBuilder builder = new StringBuilder(len);
		while (cursor < len) {
			int consumed = consumer.apply(input, cursor, builder);
			if (consumed == 0) {
				// Nothing consumed, not an escaped character
				char c1 = input.charAt(cursor++);
				builder.append(c1);

				// Does additional character need to be appended?
				if (Character.isHighSurrogate(c1) && cursor < len) {
					char c2 = input.charAt(cursor);
					if (Character.isLowSurrogate(c2)) {
						builder.append(c2);
						cursor += 1;
					}
				}
			} else {
				// Shift cursor by amount consumed
				for (int pt = 0; pt < consumed; ++pt) {
					cursor += Character.charCount(Character.codePointAt(input, cursor));
				}
			}
		}
		return builder.toString();
	}
Replaces standard escape codes with literal values.
<br>
For example: {@code \n}, {@code \r}, {@code \t}, {@code \}, and {@code "}

@param input
		Input text.

@return String with escaped characters.
recaf-core/src/main/java/software/coley/recaf/util/EscapeUtil.java