coflandscaper.find_last_occurrence

coflandscaper.find_last_occurrence(lines, keyword)[source]

Return the index of the last occurrence of a keyword.

Parameters:
  • lines (list[str]) – Text lines from a CRYSTAL output.

  • keyword (str) – Substring to search for.

Returns:

Index of the last matching line, or -1 if not found.

Return type:

int