Logo

Programming-Idioms

This language bar is your friend. Select your favorite languages!
  • Rust

Idiom #339 Clear a byte array

Set all the elements of the byte array a to zero

a.fill(0);

a is anything that can be coerced to a slice
Array.Fill(a, (byte)0);

New implementation...
< >
programming-idioms.org