package core_kernel
- Overview
 - No Docs
 
You can search for identifiers within the package.
in-package search v0.2.0
Install
    
    dune-project
 Dependency
Authors
Maintainers
Sources
sha256=2e9dec37cf1b1a05fa3ad24ae8efd1e389b82928d598db097771405da1d6b214
    
    
  md5=ee4f3b03ce7fa4cb0c27e9b02cc7712d
    
    
  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 quickcheck_generator : t Base_quickcheck.Generator.tval quickcheck_observer : t Base_quickcheck.Observer.tval quickcheck_shrinker : t Base_quickcheck.Shrinker.tval of_string : string -> tTakes O(1) time. The string isn't copied, so don't mutate it.
val empty : tval is_empty : t -> boolval length : t -> intval to_string : t -> stringAllocates a fresh string, so takes time proportional to the total size of the result.
val to_char_sequence : t -> char Core_kernel.Sequence.tto_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 -> unitAppends the contents of the Rope at the end of a destination buffer.
is_prefix a ~prefix:b is a more efficient version of String.is_prefix (Rope.to_string a) ~prefix:(Rope.to_string b). However, the worst-case time complexity is still O(length t) instead of O(min(length t, length prefix)) as one could expect.
module For_testing : sig ... end