wholeMatches | |||||||
Type | property | ||||||
Dictionary | LCS | ||||||
Library | LiveCode Script | ||||||
Syntax |
| ||||||
Summary | Specifies whether the lineOffset, wordOffset, and itemOffset functions search only for entire lines, words, or items. | ||||||
Introduced | 1.0 | ||||||
OS | mac, windows, linux, ios, android | ||||||
Platforms | desktop, server, mobile | ||||||
Example |
| ||||||
Values |
| ||||||
Related | Keyword: 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
is equivalent to the expression
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. | ||||||
Tags | text processing |