A class designed to handle all sorts of text searches within a [[Document Document]].

Hierarchy (view full)

Constructors

Properties

$options: Partial<SearchOptions>

Methods

  • Parameters

    • needle: string
    • modifier: string

    Returns false | RegExp[]

  • Parameters

    • options: Partial<SearchOptions>
    • Optional $disableFakeMultiline: boolean

    Returns any

  • Parameters

    • options: any

    Returns boolean

  • Parameters

    • session: EditSession
    • options: any

    Returns false | {
        forEach: ((callback) => void);
    }

  • Parameters

    • session: any
    • re: any
    • endIndex: any
    • start: any
    • first: any

    Returns {
        endCol: any;
        endRow: number;
        startCol: any;
        startRow: any;
    }

    • endCol: any
    • endRow: number
    • startCol: any
    • startRow: any
  • Parameters

    • session: any
    • re: any
    • start: any
    • last: any

    Returns {
        endCol: any;
        endRow: number;
        startCol: any;
        startRow: number;
    }

    • endCol: any
    • endRow: number
    • startCol: any
    • startRow: number
  • Searches for options.needle. If found, this method returns the [[Range Range]] where the text first occurs. If options.backwards is true, the search goes backwards in the session.

    Parameters

    • session: EditSession

      The session to search with

    Returns false | Range

  • Searches for all occurrances options.needle. If found, this method returns an array of [[Range Ranges]] where the text first occurs. If options.backwards is true, the search goes backwards in the session.

    Parameters

    • session: EditSession

      The session to search with

    Returns Range[]

  • [Returns an object containing all the search options.]{: #Search.getOptions}

    Returns Partial<SearchOptions>

  • Parameters

    • replaceString: any

    Returns any

  • Searches for options.needle in input, and, if found, replaces it with replacement.

    Parameters

    • input: string

      The text to search in

    • replacement: any

      The replacing text

      • (String): If options.regExp is true, this function returns input with the replacement already made. Otherwise, this function just returns replacement.
        If options.needle was not found, this function returns null.

    Returns string

  • Sets the search options via the options parameter.

    Parameters

    • options: Partial<SearchOptions>

      An object containing all the new search properties

    Returns Search

    Chainable

  • Sets the search options via the options parameter.

    Parameters

    • options: Partial<SearchOptions>

      object containing all the search propertie

    Returns void

    Related

    Search.set

Generated using TypeDoc