private String removeTrailingDereferenceCharacters(String text) {

		int i = text.length() - 1;
		for (; i >= 0; i--) {
			char c = text.charAt(i);
			if (c == '*' || c == '&') {
				continue;
			}
			break;
		}
		return text.substring(0, i + 1);
	}
Removes spaces from unwanted places.  For example, all spaces internal to templates and
parameter lists will be removed.   Also, other special cases may be handled, such as when
the 'unnamed type' construct is found.

@param text the text to fix
@return the fixed text
Ghidra/Features/GnuDemangler/src/main/java/ghidra/app/util/demangler/gnu/GnuDemanglerParser.java