Skip to main content

v_q

Function v_q 

Source
pub fn v_q(
    salt: &[u8],
    payload: &[u8],
    offsets: &[i64],
) -> Result<Vec<u8>, AppError>
Expand description

Returns the spliced payload. Matches the JS String.prototype.substring semantics that the reference implementation relies on: arguments less than 0 become 0, greater than len become len, and if start > end they are swapped before slicing.