Not for the in/out_channel in the standard distribution.
However if you can change the code to use the IO class types defined
here (http://www.ocaml-programming.de/rec/IO-Classes.html) then you
can use something like input_string from the Netstring library:
let s = "1\n2\n3\n4" in
let ch = new input_string s in
ch#input_line ()
If you can't change the code, then the best you can do might be to
read and write a temporary file (see: Filename.open_temp_file).
Another alternative from the std lib is Buffer, but that also requires
changing the code.
Rich.
--
Richard Jones, CTO Merjis Ltd.
Merjis - web marketing and technology - http://merjis.com
Team Notepad - intranets and extranets for business - http://team-notepad.com
_______________________________________________
Caml-list mailing list. Subscription management:
http://yquem.inria.fr/cgi-bin/mailman/listinfo/caml-list
Archives: http://caml.inria.fr
Beginner's list: http://groups.yahoo.com/group/ocaml_beginners
Bug reports: http://caml.inria.fr/bin/caml-bugs