メインコンテンツまでスキップ
バージョン:25.2

contain, contains

  • operator
  • contains, does not contain
  • Tests whether one value contains another.
  • The contains and is in operators have been enhanced for cases where the container being examined is an object. As before, the object is sent a containsItem function message with the search value and case sensitivity indicator as parameters. If the object doesn't implement a handler for that message, the default implementation of the containsItem function can now behave in any of three ways, according to the setting of a new global property: the objectContainsItemDefinition. If this property is set to "AsTextContains" (the new default behavior) the expression is true if the object's text value contains the search value. When set to "NestedValueContains", the operator is applied to each of the object's values and the expression will yield true if any them contains the search value. Finally, a setting of "KeyOrValueEquals" will give the former default behavior:  the operator returns true if the search value is equal to one of the object's keys or to one of its values.
  • Related: is in