OptionQ
[expr]True
if expr has the form of a valid option specification.Examples of option specifications:
OptionQ[a -> True]
OptionQ[a :> True]
OptionQ[{a -> True}]
OptionQ[{a :> True}]
Options lists are flattened when are applied, so
OptionQ[{a -> True, {b->1, "c"->2}}]
OptionQ[{a -> True, {b->1, c}}]
OptionQ[{a -> True, F[b->1,c->2]}]
OptionQ
returns False
if its argument is not a valid option
specification:
OptionQ[x]