wholeMatches

Typeproperty
DictionaryLCS
LibraryLiveCode Script
Syntax
set the wholeMatches to {true | false}
Summary

Specifies whether the lineOffset, wordOffset, and itemOffset functions search only for entire lines, words, or items.

Introduced1.0
OSmac, windows, linux, ios, android
Platformsdesktop, server, mobile
Example
set the wholeMatches to true
Values
NameTypeDescription
Value

The wholeMatches is true or false. By default, the wholeMatches property is set to false.

RelatedKeyword: whole, item, lines, line, words, word, items
Operator: is among
Property: caseSensitive
Command: reset
Function: wordOffset, itemOffset, lineOffset, value
Glossary: property, return, call, handler, operator, execute, container, function call, function, local property
Description

Use the wholeMatches property to find lines, words, or items in a container only if what you're searching for matches an entire line, word, or item.

For example, suppose line 6 of a field named "Test" is "additive". The expression lineOffset("add",field "Test") evaluates to 6 if the wholeMatches is false, because "add" is part of the line "additive". If the wholeMatches is true, this function call returns 0 (zero), because "add" does not exactly match the line "additive".

If the wholeMatches property is set to true, the expression

lineOffset(phrase, container)

is equivalent to the expression

phrase is among the lines of container

except that the first evaluates to a line number and the second evaluates to true or false. Similarly, the wordOffset and itemOffset functions operate similarly to the is among operator if the wholeMatches property is true.

Since the wholeMatches is a local property, its value is reset to false when the current handler finishes executing. It retains its value only for the current handler, and setting it in one handler does not affect its value in other handlers it calls.

Tagstext processing