njs/buffer
Buffer is a view of ArrayBuffer
Types
pub type ArrayBuffer
pub type TypedArray
pub type TypedArrayType {
Int8
UInt8
Int16
UInt16
Int32
UInt32
}
Constructors
-
Int8
-
UInt8
-
Int16
-
UInt16
-
Int32
-
UInt32
Functions
pub fn byte_length(value v: a, encoding e: Encoding) -> Int
pub fn from_buffer(buffer bf: Buffer) -> Buffer
pub fn from_bytes(array ab: Array(BitArray)) -> Buffer
pub fn from_string(
bitarray ba: BitArray,
encoding e: Encoding,
) -> Buffer
pub fn get_buffer(buffer bf: Buffer) -> ArrayBuffer
pub fn get_buffer_offset(buffer b: Buffer) -> Int
pub fn includes_string(
buffer bf: Buffer,
value v: BitArray,
offset o: Int,
encoding e: Encoding,
) -> Bool
pub fn index_of_string(
buffer bf: Buffer,
value v: BitArray,
offset o: Int,
encoding e: Encoding,
) -> Int
pub fn last_index_of(
buffer bf: Buffer,
value v: a,
offset o: Int,
encoding e: Encoding,
) -> Int
pub fn last_index_of_string(
buffer bf: Buffer,
value v: BitArray,
offset o: Int,
encoding e: Encoding,
) -> Int
pub fn new_array_buffer(size s: Int) -> ArrayBuffer
pub fn new_typed_array(
t: TypedArrayType,
size s: Int,
) -> TypedArray
pub fn to_string(
buffer bf: Buffer,
encoding e: Encoding,
from f: Int,
to t: Int,
) -> String