Pudu programming language
Menu
API reference

Std.Bytes.repeat

1 declaration

fn

repeat: &Bytes -> Int -> Bytes

This is a callable function.

What it does

A sequence repeated, or nothing repeated when the count is not positive.

Built by doubling: the running copy doubles each step and is appended when

the matching bit of the count is set, so the steps follow the bits of the

count rather than the count itself.

Read the signature

  • The text after the name is the type checked by Pudu.
  • Read arrows from left to right: inputs come first, and the final type is returned.
  • & borrows a value for this call instead of moving or copying it.

Back to Std.BytesSearch related declarations