feat(data-structures): add is_empty getter to map, string and blob.

This commit is contained in:
ltabis
2022-08-24 09:54:41 +02:00
parent 9c3443538a
commit 4b3608cedc
6 changed files with 41 additions and 3 deletions

View File

@@ -3047,6 +3047,9 @@ fn keys(map: Map) -> Array;
/// Number of elements in the array.
fn len(array: Array) -> int;
/// Return true if the array is empty.
fn is_empty(array: Array) -> bool;
/// Return the length of the BLOB.
///
/// # Example
@@ -3060,9 +3063,15 @@ fn len(array: Array) -> int;
/// ```
fn len(blob: Blob) -> int;
/// Return true if the blob is empty.
fn is_empty(blob: Blob) -> bool;
/// Return the number of properties in the object map.
fn len(map: Map) -> int;
/// Return true if the map is empty.
fn is_empty(map: Map) -> bool;
/// Return the length of the string, in number of characters.
///
/// # Example
@@ -3074,6 +3083,9 @@ fn len(map: Map) -> int;
/// ```
fn len(string: String) -> int;
/// Return true if the string is empty.
fn is_empty(string: String) -> bool;
/// Return the natural log of the decimal number.
fn ln(x: Decimal) -> Decimal;

View File

@@ -2532,6 +2532,9 @@ fn keys(map: Map) -> Array;
/// Number of elements in the array.
fn len(array: Array) -> int;
/// Return true if the array is empty.
fn is_empty(array: Array) -> bool;
/// Return the length of the BLOB.
///
/// # Example
@@ -2545,9 +2548,15 @@ fn len(array: Array) -> int;
/// ```
fn len(blob: Blob) -> int;
/// Return true if the blob is empty.
fn is_empty(blob: Blob) -> bool;
/// Return the number of properties in the object map.
fn len(map: Map) -> int;
/// Return true if the map is empty.
fn is_empty(map: Map) -> bool;
/// Return the length of the string, in number of characters.
///
/// # Example
@@ -2559,6 +2568,9 @@ fn len(map: Map) -> int;
/// ```
fn len(string: String) -> int;
/// Return true if the string is empty.
fn is_empty(string: String) -> bool;
/// Return the natural log of the decimal number.
fn ln(x: Decimal) -> Decimal;