Skip to content

VECTOR_find_str

BigETI edited this page Jul 16, 2018 · 1 revision

Description

Find the index of the specified string inside the vector

Returns

The index of the found string after or at the specified index if successful, otherwise INVALID_VECTOR_INDEX

Syntax

VECTOR_find_str(Vector:vector, const value[], from_index = 0)

Example

new Vector:vector;
VECTOR_push_back_str(vector, "abc");
VECTOR_push_back_str(vector, "def");
VECTOR_push_back_str(vector, "ghi");
printf("\"def\" found at vector index %d", VECTOR_find_str(vector, "def"));

Clone this wiki locally