savi-lang / savi

A fast language for programmers who are passionate about their craft.
BSD 3-Clause "New" or "Revised" License
154 stars 12 forks source link

Add `Bytes.fill_with` and `Bytes.fill_with_zeros`. #413

Closed jemc closed 1 year ago

jemc commented 1 year ago

Bytes.fill_with_zeros can be used to "zero out" all or part of the byte buffer, and Bytes.fill_with is the more general method for filling the byte buffer with any given value.

These are basically just safe wrappers for the memset C call.