Skip to content

MAP_get_ptr_str

BigETI edited this page May 4, 2018 · 1 revision

Description

Map get pointer and size (key[] as string)

Returns

Pointer of the value, otherwise MEM_NULLPTR

Syntax

Pointer:MAP_get_ptr_str(Map:map, const key[])

Example

new Map:map, Pointer:ptr;
MAP_insert_str_str(map, "This is a test.", "foo");
ptr = MAP_get_ptr_str(map, "This is a test.");
if (ptr == MEM_NULLPTR)
{
	print("Value not found.");
}
else
{
	printf("Value pointer: 0x%x", _:ptr);
	printf("Value size: %d", MEM_get_size(ptr));
}