package core_kernel
Industrial strength alternative to OCaml's standard library
Install
Dune Dependency
Authors
Maintainers
Sources
v0.12.3.tar.gz
sha256=c9969799846cf1c40ddc691ef7e977fbb77d0e93d0461a632e207a40b7002f78
md5=f4afcf23e7dfd7de8e292ce37cdd3301
doc/core_kernel.rope/Rope/index.html
Module Rope
A rope is a standard data structure that represents a single string as a tree of strings, allowing concatenation to do no work up front. See the README.md file for details and motivating examples.
val of_string : string -> t
Takes O(1) time. The string isn't copied, so don't mutate it.
val empty : t
val is_empty : t -> bool
val length : t -> int
val to_string : t -> string
Allocates a fresh string, so takes time proportional to the total size of the result.
val to_char_sequence : t -> char Core_kernel.Sequence.t
to_char_sequence
can often produce characters incrementally, but in the worst case it takes time and memory proportional to the total length of the string to produce even a single character. (In such cases, it should still only take O(length) time to produce the rest of the string.)
val add_to_buffer : t -> Core_kernel.Buffer.t -> unit
Appends the contents of the Rope at the end of a destination buffer.
sectionYPositions = computeSectionYPositions($el), 10)"
x-init="setTimeout(() => sectionYPositions = computeSectionYPositions($el), 10)"
>