rbuffer.mli 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839
  1. (**************************************************************************)
  2. (* *)
  3. (* Copyright (C) Jean-Christophe Filliatre *)
  4. (* *)
  5. (* This software is free software; you can redistribute it and/or *)
  6. (* modify it under the terms of the GNU Library General Public *)
  7. (* License version 2.1, with the special exception on linking *)
  8. (* described in file LICENSE. *)
  9. (* *)
  10. (* This software is distributed in the hope that it will be useful, *)
  11. (* but WITHOUT ANY WARRANTY; without even the implied warranty of *)
  12. (* MERCHANTABILITY or FITNESS FOR A PARTICULAR PURPOSE. *)
  13. (* *)
  14. (**************************************************************************)
  15. (* Ropes-based implementation of Buffer *)
  16. type t
  17. val create : int -> t
  18. val reset : t -> unit
  19. val clear : t -> unit
  20. val length : t -> int
  21. val unsafe_contents : t -> string
  22. val sub : t -> int -> int -> string
  23. val nth : t -> int -> char
  24. val add_char : t -> char -> unit
  25. val add_substring : t -> string -> int -> int -> unit
  26. val add_string : t -> string -> unit
  27. val add_buffer : t -> t -> unit
  28. val add_channel : t -> in_channel -> int -> unit
  29. val output_buffer : out_channel -> t -> unit