def find_all_occurrences(self, search: str, zero_based: bool = True) -> List[int]:
        """Returns the line numbers of all occurrences of the search string."""
        indices = list(_find_all(self.text, search))
        line_numbers = []
        for index in indices:
            line_no = len(self.text[:index].split("\n"))
            if zero_based:
                line_numbers.append(line_no - 1)
            else:
                line_numbers.append(line_no)
        return line_numbers
Returns the line numbers of all occurrences of the search string.
tools/windowed/lib/windowed_file.py