blob: 918efc35faab165094add2b9f483f123717e0e8e [file] [log] [blame]
MG Mud User88f12472016-06-24 23:31:02 +02001SYNOPSIS
Zesstrad59c3892019-11-28 20:53:39 +01002 int member(mixed *array, mixed elem [, int start])
3 int member(string s, int elem [, int start])
4 int member(bytes s, int elem [, int start])
Zesstra715ec202025-07-09 22:18:31 +02005 int member(mapping m, mixed key)
MG Mud User88f12472016-06-24 23:31:02 +02006
Zesstra715ec202025-07-09 22:18:31 +02007DESCRIPTION
8 For arrays, strings and byte sequences, returns the index of the
9 first occurance of second arg in the first arg, or -1 if none found.
10 If <start> is given and non-negative, the search starts at
11 that position. A start position beyond the end of the string
12 or array will cause the efun to return -1.
MG Mud User88f12472016-06-24 23:31:02 +020013
Zesstra715ec202025-07-09 22:18:31 +020014 For mappings it checks, if key is present in mapping m and
15 returns 1 if so, 0 if key is not in m.
MG Mud User88f12472016-06-24 23:31:02 +020016
Zesstra715ec202025-07-09 22:18:31 +020017HISTORY
18 LDMud 3.3.556 added the <start> parameter.
MG Mud User88f12472016-06-24 23:31:02 +020019
Zesstra715ec202025-07-09 22:18:31 +020020SEE ALSO
Zesstrad59c3892019-11-28 20:53:39 +010021 rmember(E), mappings(LPC)