class type mstring =object
..end
The object holding the string value
method length : int
The length of the managed string
method blit_to_bytes : int -> Stdlib.Bytes.t -> int -> int -> unit
blit_to_bytes mpos s spos len
: Copies the substring of the
managed string from mpos
to mpos+len-1
to the substring of
s
from spos
to spos+len-1
method blit_to_string : int -> Stdlib.Bytes.t -> int -> int -> unit
method blit_to_memory : int -> Netsys_mem.memory -> int -> int -> unit
blit_to_string mpos mem mempos len
: Copies the substring of the
managed string from mpos
to mpos+len-1
to the substring of
mem
from mempos
to mempos+len-1
method as_bytes : Stdlib.Bytes.t * int
Returns the contents as bytes. It is undefined whether the returned string is a copy or the underlying buffer. The int is the position where the contents start
method as_string : string * int
Returns the contents as string (this is always a copy)
method as_memory : Netsys_mem.memory * int
Returns the contents as memory. It is undefined whether the returned memory is a copy or the underlying buffer. The int is the position where the contents start
method preferred : [ `Bytes | `Memory ]
Whether as_memory
or as_bytes
is cheaper