core :: CString :: to_bytes
Bytes
self
len
If len is null, strlen will determine the length of the Bytes
# Creates a new `Bytes` object from `self` with `len` as length # # If `len` is null, strlen will determine the length of the Bytes fun to_bytes(len: nullable Int): Bytes do if len == null then len = cstring_length return new Bytes(self, len, len) end