- Method `&
mixed `&(mixed arg1)
mixed `&(mixed arg1, mixed arg2, mixed ... extras)
mixed `&(object arg1, mixed arg2)
mixed `&(mixed arg1, object arg2)
int `&(int arg1, int arg2)
string `&(string arg1, string arg2)
array `&(array arg1, array arg2)
mapping `&(mapping arg1, mapping arg2)
mapping `&(mapping arg1, array arg2)
mapping `&(mapping arg1, multiset arg2)
multiset `&(multiset arg1, multiset arg2)
type `&(type|program arg1, type|program arg2)
Every expression with the
&operator becomes a call to this function, i.e.
a&bis the same as
If there's a single argument, that argument is returned.
If there are more than two arguments the result is:
`&(`&(arg1, arg2), @extras).
Otherwise, if arg1 is an object with an lfun::`&(), that function is called with arg2 as argument, and its result is returned.
Otherwise, if arg2 is an object with an lfun::``&(), that function is called with arg1 as argument, and its result is returned.
Otherwise the result depends on the argument types:arg1 can have any of the following types:
Bitwise and of arg1 and arg2.
The result is a string where each character is the bitwise and of the characters in the same position in arg1 and arg2. The arguments must be strings of the same length.
Type intersection of arg1 and arg2.
The function is not destructive on the arguments - the result is always a new instance.
- See also