MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 1 | SYNOPSIS |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 2 | 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]) |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 5 | int member(mapping m, mixed key) |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 6 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 7 | DESCRIPTION |
| 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 User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 13 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 14 | 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 User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 16 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 17 | HISTORY |
| 18 | LDMud 3.3.556 added the <start> parameter. |
MG Mud User | 88f1247 | 2016-06-24 23:31:02 +0200 | [diff] [blame] | 19 | |
Zesstra | 715ec20 | 2025-07-09 22:18:31 +0200 | [diff] [blame^] | 20 | SEE ALSO |
Zesstra | d59c389 | 2019-11-28 20:53:39 +0100 | [diff] [blame] | 21 | rmember(E), mappings(LPC) |