module type UNSAFELY_MUTABLE =sig
..end
They are considered “unsafe” because they break the immutability
invariants assumed by the rest of this library; you'd better
know what you're doing.
type
t
type
character
val mutate : t ->
index:int ->
character -> (unit, [> `out_of_bounds ]) Sosa.result
index
-th character of the string.val mutate_exn : t ->
index:int -> character -> unit
index
-th character of the string, but fail with a
non-specified exception.val blit : src:t ->
src_index:int ->
dst:t ->
dst_index:int -> length:int -> (unit, [> `out_of_bounds ]) Sosa.result
length
characters from src
(starting at src_index
) to
dst
(starting at dst_index
).val blit_exn : src:t ->
src_index:int ->
dst:t -> dst_index:int -> length:int -> unit
Sosa.UNSAFELY_MUTABLE.blit
but fail with a non-specified exception.