mirror of
https://github.com/c3lang/c3c.git
synced 2026-02-27 12:01:16 +00:00
std/lib/collections: add Object.get_len(); add some tests for encoding/json
Signed-off-by: Pierre Curto <pierre.curto@gmail.com>
This commit is contained in:
committed by
Christoffer Lerno
parent
120d5a672c
commit
c09b6154f4
@@ -274,6 +274,14 @@ fn Object* Object.get_at(&self, usz index)
|
||||
return self.array.get(index);
|
||||
}
|
||||
|
||||
/**
|
||||
* @require self.is_indexable()
|
||||
**/
|
||||
fn usz Object.get_len(&self)
|
||||
{
|
||||
return self.array.len();
|
||||
}
|
||||
|
||||
/**
|
||||
* @require self.is_indexable()
|
||||
**/
|
||||
|
||||
Reference in New Issue
Block a user