obj_has_keyΒΆ
obj_has_key checks if a given key exists.
-
bool = obj_has_key(obj, key)
Return Value
bool is TRUE (1), if the key exists and otherwise FALSE (0).
Parameters
-
obj
obj is the object created with obj_create.
-
key
key is a number or a string.
Example
obj = obj_create()
obj[1] = 1
obj[3] = 3 // integer key
obj.val = "Test" // String key
print obj_has_key(obj, 2) // 0
print obj.has_key(2) // 0
print obj.has_key(1) // 1
print obj.has_key("val") // 1
See also
id-1319100