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

Constructors

    • new Search()
  • needle: ""
  • backwards: false
  • wrap: false
  • caseSensitive: false
  • wholeWord: false
  • scope: ALL
  • regExp: false

Methods

Searches for options.needle. If found, this method returns the Range where the text first occurs. If `...

Searches for options.needle. If found, this method returns the Range where the text first occurs. If options.backwards is true, the search goes backwards in the session.

   

Arguments

sessionEditSessionRequired. The session to search with

Searches for all occurances options.needle. If found, this method returns an array of Ranges where the...

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

   

Arguments

sessionEditSessionRequired. The session to search with

Returns an object containing all the search options.

Returns an object containing all the search options.

   

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

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

   

Arguments

inputStringRequired. The text to search in
replacementStringRequired. The replacing text

Returns

StringIf 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.

Sets the search options via the options parameter. ...

Sets the search options via the options parameter.

   

Arguments

optionsObjectRequired. An object containing all the new search properties