[Package Index | Mudlib Index | Effect Index]

File /secure/simul_efun/find_member.c

Contains a couple of sfuns.

Method index

Public Functions

These are functions that everyone can access.

find_member
varargs int * find_member(mixed target,
                          mixed array,
                          int flag)

This function finds all the occurences of target in array

Parameters:
target - The thing to search for
array - The array to search in
flag - Options for searching; same meaning as for member_array()

Returns:
An array of indices for which the target matches the array

See also:
member_array .c


string_match
int string_match(string str1,
                 string str2,
                 int case_sensitive)

This checks how similar two strings are.

Parameters:
str1 - The first string
str2 - The second string
case_sensitive - If true, make the comparision case sensitive

Returns:
A measure of how well the strings match. 0 for no match at all, 100 if the strings are the same