private DemangledTemplate parseTemplate(String string) {

		String contents = string;
		if (string.startsWith("<") && string.endsWith(">")) {
			contents = string.substring(1, string.length() - 1);
		}

		List<DemangledParameter> parameters = parseParameters(contents);
		DemangledTemplate template = new DemangledTemplate();
		for (DemangledParameter parameter : parameters) {
			template.addParameter(parameter.getType());
		}
		return template;
	}
Walks backward from the given start position to find the next namespace separator.  This
allows clients to determine if a given position is inside of a namespace.

@param text the text to search
@param start the start position
@param stop the stop position
@return the start index of the namespace entry containing the current {@code start}
        index; -1 if no namespace start is found
Ghidra/Features/GnuDemangler/src/main/java/ghidra/app/util/demangler/gnu/GnuDemanglerParser.java