Bytes Length
The bytes::length
function calculates the length of a byte slice.
Syntax
bytes::length(<byte-slice>)
Parameters
byte-slice
: The input byte slice whose length you want to calculate.
Returns
- Number: The length of the provided byte slice.
Example
bytes::length(response::body::bytes())
Output
5
This function is useful for determining the size of binary data or encoded strings.