public static int indexOfWord(String text, String searchWord) {
		int index = 0;
		while (index < text.length()) {
			index = text.indexOf(searchWord, index);
			if (index < 0) {
				return -1;
			}
			if (isWholeWord(text, index, searchWord.length())) {
				return index;
			}
			index += searchWord.length();
		}
		return -1;
	}
Returns the index of the first whole word occurrence of the search word within the given
text. A whole word is defined as the character before and after the occurrence must not be a
JavaIdentifierPart.

@param text the text to be searched.
@param searchWord the word to search for.
@return the index of the first whole word occurrence of the search word within the given
        text, or -1 if not found.
Ghidra/Framework/Generic/src/main/java/ghidra/util/StringUtilities.java