Skip to content

MAP_get_str_arr

BigETI edited this page May 4, 2018 · 1 revision

Description

Map get array (key[] as string)

Syntax

MAP_get_str_arr(Map:map, const key[], value[], value_size = sizeof value)

Example

new Map:map, arr[10] = { 100, ... }, arr2[sizeof arr1];
MAP_insert_str_arr(map, "This is a test.", arr1);
MAP_get_str_arr(map, "This is a test.", arr2);
for (new i; i < sizeof arr2; i++)
{
	printf("arr2[%d] = %d", i, arr2[i]);
}

or

new Map:map, str[4];
MAP_insert_str_arr(map, "This is a test.", "foo");
MAP_get_str_arr(map, "This is a test.", str);
printf("The value for \"This is a test.\" is \"%s\"", str);