Skip to content

SortArray_Contains

Sancky edited this page Oct 18, 2022 · 1 revision

Description

Check if an value exists in a sorted array.

Syntax

SortArray_Contains(array[], value)

Example

new SortedArray:array<10>;

SortArray_Insert(array, 1);
SortArray_Insert(array, 5);
SortArray_Insert(array, 10);
SortArray_Insert(array, 15);

printf("Sorted array have the element 20: %d", SortArray_Contains(array, 20));

Returns

Returns true if value exists, otherwise false.

Clone this wiki locally