Add comments to standard library functions.

This commit is contained in:
Stephen Chung
2022-01-17 21:49:06 +08:00
parent 5232bbbff8
commit 16c03cc864
3 changed files with 387 additions and 21 deletions

View File

@@ -1993,7 +1993,7 @@ pub mod array_functions {
) -> RhaiResultOf<Array> {
drain(ctx, array, FnPtr::new(filter)?)
}
/// Remove all elements in the array within an exclusive range and return them as a new array.
/// Remove all elements in the array within an exclusive `range` and return them as a new array.
///
/// # Example
///
@@ -2018,7 +2018,7 @@ pub mod array_functions {
let end = INT::max(range.end, start);
drain_range(array, start, end - start)
}
/// Remove all elements in the array within an inclusive range and return them as a new array.
/// Remove all elements in the array within an inclusive `range` and return them as a new array.
///
/// # Example
///
@@ -2189,7 +2189,7 @@ pub mod array_functions {
) -> RhaiResultOf<Array> {
retain(ctx, array, FnPtr::new(filter)?)
}
/// Remove all elements in the array not within an exclusive range and return them as a new array.
/// Remove all elements in the array not within an exclusive `range` and return them as a new array.
///
/// # Example
///
@@ -2214,7 +2214,7 @@ pub mod array_functions {
let end = INT::max(range.end, start);
retain_range(array, start, end - start)
}
/// Remove all elements in the array not within an inclusive range and return them as a new array.
/// Remove all elements in the array not within an inclusive `range` and return them as a new array.
///
/// # Example
///