public static int findLastWordPosition(String s) {
		int len = s.length();
		int pos = -1;
		for (int i = len - 1; i >= 0; --i) {
			char c = s.charAt(i);
			if (!Character.isLetterOrDigit(c)) {
				pos = i + 1;
				break;
			}
		}
		// did string end of a char that is not a letter or digit?
		if (pos >= len) {
			pos = -1;
		}
		return pos;
	}
Finds the starting position of the last word in the given string.

@param s the string to search
@return int the starting position of the last word, -1 if not found
Ghidra/Framework/Generic/src/main/java/ghidra/util/StringUtilities.java