From mboxrd@z Thu Jan 1 00:00:00 1970 Received: (from majordomo@localhost) by pauillac.inria.fr (8.7.6/8.7.3) id JAA19609; Thu, 17 Jul 2003 09:06:04 +0200 (MET DST) X-Authentication-Warning: pauillac.inria.fr: majordomo set sender to owner-caml-list@pauillac.inria.fr using -f Received: from concorde.inria.fr (concorde.inria.fr [192.93.2.39]) by pauillac.inria.fr (8.7.6/8.7.3) with ESMTP id JAA03843 for ; Thu, 17 Jul 2003 09:06:02 +0200 (MET DST) Received: from relay.pair.com (relay.pair.com [209.68.1.20]) by concorde.inria.fr (8.11.1/8.11.1) with SMTP id h6H761f10457 for ; Thu, 17 Jul 2003 09:06:01 +0200 (MET DST) Received: (qmail 6475 invoked from network); 17 Jul 2003 07:06:00 -0000 Received: from arda.pair.com (HELO checkerdell.d6.com) (209.68.1.133) by relay.pair.com with SMTP; 17 Jul 2003 07:06:00 -0000 X-pair-Authenticated: 209.68.1.133 Message-Id: <4.3.2.7.2.20030717000026.026bcaa0@localhost> X-Sender: checker@localhost X-Mailer: QUALCOMM Windows Eudora Version 4.3.2 Date: Thu, 17 Jul 2003 00:05:59 -0700 To: caml-list@inria.fr From: Chris Hecker Subject: [Caml-list] string buffer as (in|out)_channel Mime-Version: 1.0 Content-Type: text/plain; charset="us-ascii"; format=flowed X-Loop: caml-list@inria.fr X-Spam: no; 0.00; hecker:01 checker:01 buffer:01 formatter:01 pervasives:01 val:01 unsubscribed:99 chris:01 it'd:01 module:03 string:03 stuff:05 probably:05 strings:06 versions:06 Sender: owner-caml-list@pauillac.inria.fr Precedence: bulk Is there any way to do something similar to the C++ string stream stuff, where you treat strings (or Buffer.t's) as in_ or out_channels? The Format module has a formatter for strings, but there doesn't seem to be a way to do it with Pervasives. Something like: val out_channel_of_buffer : Buffer.t -> out_channel val in_channel_of_buffer : Buffer.t -> in_channel and maybe _of_string versions too (probably necessary because you can't convert a string to a buffer for the in_channel), which fill up and don't expand. It'd be very useful to be able to do this. Thanks, Chris PS. Please cc me on replies, I temporarily unsubscribed from the list, thanks! ------------------- To unsubscribe, mail caml-list-request@inria.fr Archives: http://caml.inria.fr Bug reports: http://caml.inria.fr/bin/caml-bugs FAQ: http://caml.inria.fr/FAQ/ Beginner's list: http://groups.yahoo.com/group/ocaml_beginners