diff options
author | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
---|---|---|
committer | Jun FURUSE / 古瀬 淳 <jun.furuse@gmail.com> | 2004-06-18 05:04:14 +0000 |
commit | 5e1bf20850aaa9b1ceb86a971848609ee9e84c47 (patch) | |
tree | f3a6e5b5c38263fe527e6275ff95425f12637226 /stdlib/buffer.mli | |
parent | 8ec769214e067da9ee8b33d05f4ef275e9269dd5 (diff) | |
download | ocaml-gcaml.tar.gz |
port to the latest ocaml (2004/06/18)gcaml
git-svn-id: http://caml.inria.fr/svn/ocaml/branches/gcaml@6419 f963ae5c-01c2-4b8c-9fe0-0dff7051ff02
Diffstat (limited to 'stdlib/buffer.mli')
-rw-r--r-- | stdlib/buffer.mli | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/stdlib/buffer.mli b/stdlib/buffer.mli index 73e02e299b..6fc76148ad 100644 --- a/stdlib/buffer.mli +++ b/stdlib/buffer.mli @@ -11,6 +11,8 @@ (* *) (***********************************************************************) +(* $Id$ *) + (** Extensible string buffers. This module implements string buffers that automatically expand @@ -40,6 +42,16 @@ val contents : t -> string (** Return a copy of the current contents of the buffer. The buffer itself is unchanged. *) +val sub : t -> int -> int -> string +(** [Buffer.sub b off len] returns (a copy of) the substring of the +current contents of the buffer [b] starting at offset [off] of length +[len] bytes. May raise [Invalid_argument] if out of bounds request. The +buffer itself is unaffected. *) + +val nth : t -> int -> char +(** get the n-th character of the buffer. Raise [Invalid_argument] if +index out of bounds *) + val length : t -> int (** Return the number of characters currently contained in the buffer. *) |