KeyMemberQ

KeyMemberQ[assoc,form]

如果关联 assoc 中有键与 form 匹配则产生 True,否则产生 False.

KeyMemberQ[form]

表示可以应用于表达式的 KeyMemberQ 的运算符形式n.

范例

基本范例  (4)

检测 "x" 是否是关联中的键:

检测关联是否包含字符串的键:

KeyMemberQ 适用于规则列表:

判断哪个关联不包含键:

Wolfram Research (2015),KeyMemberQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/KeyMemberQ.html.

文本

Wolfram Research (2015),KeyMemberQ,Wolfram 语言函数,https://reference.wolfram.com/language/ref/KeyMemberQ.html.

CMS

Wolfram 语言. 2015. "KeyMemberQ." Wolfram 语言与系统参考资料中心. Wolfram Research. https://reference.wolfram.com/language/ref/KeyMemberQ.html.

APA

Wolfram 语言. (2015). KeyMemberQ. Wolfram 语言与系统参考资料中心. 追溯自 https://reference.wolfram.com/language/ref/KeyMemberQ.html 年

BibTeX

@misc{reference.wolfram_2024_keymemberq, author="Wolfram Research", title="{KeyMemberQ}", year="2015", howpublished="\url{https://reference.wolfram.com/language/ref/KeyMemberQ.html}", note=[Accessed: 21-November-2024 ]}

BibLaTeX

@online{reference.wolfram_2024_keymemberq, organization={Wolfram Research}, title={KeyMemberQ}, year={2015}, url={https://reference.wolfram.com/language/ref/KeyMemberQ.html}, note=[Accessed: 21-November-2024 ]}