public static String getCleanUserName(String name) {
		String uname = name;
		// Remove the spaces since some operating systems allow
		// spaces and some do not, Java's File class doesn't
		StringBuilder nameBuf = new StringBuilder();
		if (uname.indexOf(" ") >= 0) {
			StringTokenizer tokens = new StringTokenizer(uname, " ", false);
			while (tokens.hasMoreTokens()) {
				nameBuf.append(tokens.nextToken());
			}
			uname = nameBuf.toString();
		}

		// Remove leading Domain Name if present
		int slashIndex = uname.lastIndexOf('\\');
		if (slashIndex >= 0) {
			uname = uname.substring(slashIndex + 1);
		}
		return uname;
	}
Clean the specified user name to eliminate any spaces or leading domain name
which may be present (e.g., "MyDomain\John Doe" becomes "JohnDoe").
@param name user name string to be cleaned-up
@return the clean user name
Ghidra/Framework/Utility/src/main/java/ghidra/util/SystemUtilities.java