Skip to main content

has_name

Synopsis

@has_name(String) -> Boolean

@has_name(InnerFunction) -> Boolean

Description

Checks whether the given name is associated to the object.

info

Available in Contextal Platform 1.0 and later.

Parameters

String (for exact match) or regex/iregex/starts_with.

Return value

Boolean: true if the requested name is present, false otherwise.

Examples

@has_name(iregex("\\.exe$"))
  • This matches all objects that have names ending with .exe, regardless of letter casing.
object_type == "RAR"
&& @has_child(object_type == "PE"
&& @has_name(iregex("(order|invoice)"))
)
  • This matches a RAR object, which has a children of PE type (Windows executable), which name contains order or invoice substrings (case insensitive).