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:
Pierre Curto
2023-08-25 21:25:07 +02:00
committed by Christoffer Lerno
parent 120d5a672c
commit c09b6154f4
2 changed files with 13 additions and 1 deletions

View File

@@ -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()
**/