Trilium Frontend API
    Preparing search index...

    Interface TextIterator

    A text iterator iterates over a sequence of strings. When iterating over a Text document, result values will either be lines or line breaks.

    interface TextIterator {
        done: boolean;
        lineBreak: boolean;
        value: string;
        "[iterator]"(): Iterator<string, any, any>;
        next(skip?: number): this;
        return?(value?: any): IteratorResult<string, any>;
        throw?(e?: any): IteratorResult<string, any>;
    }

    Hierarchy (View Summary)

    Index

    Properties

    done: boolean

    Whether the end of the iteration has been reached. You should probably check this right after calling next.

    lineBreak: boolean

    Whether the current string represents a line break.

    value: string

    The current string. Will be the empty string when the cursor is at its end or next hasn't been called on it yet.

    Methods

    • Returns Iterator<string, any, any>

    • Retrieve the next string. Optionally skip a given number of positions after the current position. Always returns the object itself.

      Parameters

      • Optionalskip: number

      Returns this