@Nonnull
	public static String cutOffAtNth(@Nonnull String text, char cutoff, int n) {
		int i = -1;
		while (n-- > 0) {
			if ((i = text.indexOf(cutoff, i + 1)) < 0)
				return text;
		}
		if (i < 0) return text;
		return text.substring(0, i);
	}
@param text
		Input text.
@param cutoff
		Character to match up to.
@param n
		Times to match the character.

@return Input text, up until the last cutoff sequence.
recaf-core/src/main/java/software/coley/recaf/util/StringUtil.java