index equals value. Comparison is raw: no
metamethods are consulted, so it tests identity for tables, Instances and
functions, and value equality for strings, numbers and booleans.
Parameters
number
required
Which argument to inspect, starting at
1. Must be a whole number above 0.any
required
The value to require. May be
nil, which matches a call that omitted the
argument.Properties
number
The argument position. Writable.
any
The required value. Writable.
boolean
Defaults to
false. When true, string comparison stops at the first embedded
NUL, so "Kick\0junk" matches "Kick".Behavior
- Numbers compare by value.
5and5.0are the same;"5"is not. nilis a real choice.ArgumentFilter.new(1, nil)matches a call with no first argument, and does not match one that passedfalse.StripNullis for sanitising hostile strings. Scripts sometimes append rubbish after aNULto defeat exact matching; turn it on to ignore the tail.
Example
Errors
Related
TypeFilter: match the type rather than the value.ArgCountFilter: match how many arguments were passed.