GetNextKey
Searches the entry list for an index matching a key starting from a position.
This also copies the value from that index into the given buffer.
This can be used to find the first / only value matching a key, or to iterate over all
the values that match said key.
stock int GetNextKey(const char[] key, char[] buffer, int maxlen, int start = -1)
Parameters
const char[] key
Key name to search.
char[] buffer
Value buffer. This will contain the result of the next match, or empty
if no match was found.
int maxlen
Maximum length of the value buffer.
int start
An index after which to begin searching from. Use -1 to start from the
first entry.
Return Value
int Position after start with an entry matching the given key, or -1 if no
match was found.Error
Invalid start position; must be a value between -1 and one less than the
length of the entry.