From mboxrd@z Thu Jan 1 00:00:00 1970 Return-Path: X-Original-To: caml-list@sympa.inria.fr Delivered-To: caml-list@sympa.inria.fr Received: from mail2-relais-roc.national.inria.fr (mail2-relais-roc.national.inria.fr [192.134.164.83]) by sympa.inria.fr (Postfix) with ESMTPS id 7C8707EE99 for ; Sun, 5 Jan 2014 15:24:07 +0100 (CET) Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of hez@0ok.org) identity=pra; client-ip=208.97.132.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hez@0ok.org"; x-sender="hez@0ok.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of hez@0ok.org) identity=mailfrom; client-ip=208.97.132.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hez@0ok.org"; x-sender="hez@0ok.org"; x-conformance=sidf_compatible Received-SPF: None (mail2-smtp-roc.national.inria.fr: no sender authenticity information available from domain of postmaster@homiemail-a49.g.dreamhost.com) identity=helo; client-ip=208.97.132.177; receiver=mail2-smtp-roc.national.inria.fr; envelope-from="hez@0ok.org"; x-sender="postmaster@homiemail-a49.g.dreamhost.com"; x-conformance=sidf_compatible X-IronPort-Anti-Spam-Filtered: true X-IronPort-Anti-Spam-Result: AsQCANNqyVLQYYSxlGdsb2JhbABYhBiCfrYtgQQeDgEBAQEHCwsJEiqCHAkBAQEEIx05AQ8LAwEHDSoCAiEBEgEFARwGE4dwAxGeGosTdoNikRkNhEARBox8gStoB4JvgUiJR4xogWyKS4IPg04YKYR3 X-IPAS-Result: AsQCANNqyVLQYYSxlGdsb2JhbABYhBiCfrYtgQQeDgEBAQEHCwsJEiqCHAkBAQEEIx05AQ8LAwEHDSoCAiEBEgEFARwGE4dwAxGeGosTdoNikRkNhEARBox8gStoB4JvgUiJR4xogWyKS4IPg04YKYR3 X-IronPort-AV: E=Sophos;i="4.95,607,1384297200"; d="scan'208";a="51771442" Received: from caiajhbdcbhh.dreamhost.com (HELO homiemail-a49.g.dreamhost.com) ([208.97.132.177]) by mail2-smtp-roc.national.inria.fr with ESMTP; 05 Jan 2014 15:24:02 +0100 Received: from homiemail-a49.g.dreamhost.com (localhost [127.0.0.1]) by homiemail-a49.g.dreamhost.com (Postfix) with ESMTP id EEE6A200B9916 for ; Sun, 5 Jan 2014 06:23:59 -0800 (PST) DKIM-Signature: v=1; a=rsa-sha1; c=relaxed; d=0ok.org; h=mime-version :in-reply-to:references:date:message-id:subject:from:to:cc :content-type; s=0ok.org; bh=T+5BDoEe8viPaK6FEqKBfv6VjhU=; b=bm8 0L3zW0FrioENlPEhQuWPgP7ZVCbhgvqG9riBa4JHWMLWasR9bJizwZjegIWg6uqV JReTHCM9JrWZBDHsyZbjFxZ+9rzo9/OQnJWxBN8LRcBI/JT6yW8jWtucK3T6mvJK b8qO4XgHyx84drIuCyr5K0TN9PlFGyvpNGuMgyW8= Received: from mail-qe0-f51.google.com (mail-qe0-f51.google.com [209.85.128.51]) (using TLSv1 with cipher ECDHE-RSA-RC4-SHA (128/128 bits)) (No client certificate requested) (Authenticated sender: hez@0ok.org) by homiemail-a49.g.dreamhost.com (Postfix) with ESMTPSA id C044C200B9911 for ; Sun, 5 Jan 2014 06:23:59 -0800 (PST) Received: by mail-qe0-f51.google.com with SMTP id 1so17719088qee.10 for ; Sun, 05 Jan 2014 06:23:58 -0800 (PST) X-Google-DKIM-Signature: v=1; a=rsa-sha256; c=relaxed/relaxed; d=1e100.net; s=20130820; h=x-gm-message-state:mime-version:in-reply-to:references:date :message-id:subject:from:to:cc:content-type; bh=K0TbIE6zP+hII0QzI9QNVUtCEjWtvHq+1pa/uDOvy6Y=; b=KZjZW1YD9vWnEnNU7pMDl7RZ1imxupRQuERQIXFR5yWSYnr4UAxV/rd3xl7Ju1qXs7 tMcU5vRvUUuY81vTUbaHs29kp++fDrRtGyCvXbqasBaKzKOTJp5TIB8Exe1Cvsd97QCw i1sDPxo6PEMS0Tr6Qx729ZYRZueQQz1sEawi8nJj1Nga6Jj+DfrAgW3XjvxPBmEMJtv0 PijIDCfIb8CcGxfpAmSA8wNhhfEXGDc/vhHIZqHQ2s5Bclw37zxfZ8GMTlKe1X8vFgJq nED1VgfcOfQU49lvUlsT5tUnMHnYjHXrECE3vpRLySA8iUJ5vesieaB833q1WaHRKoXj AKrA== X-Gm-Message-State: ALoCoQlU3Yofqhz4bkhk1w8UOeJqSW4OEzvcQ46n0kh2aNs6MRe8vE7mXNX5t6MON3JMZ69fhZV7 MIME-Version: 1.0 X-Received: by 10.49.30.197 with SMTP id u5mr176929366qeh.33.1388931838632; Sun, 05 Jan 2014 06:23:58 -0800 (PST) Received: by 10.96.152.104 with HTTP; Sun, 5 Jan 2014 06:23:58 -0800 (PST) Received: by 10.96.152.104 with HTTP; Sun, 5 Jan 2014 06:23:58 -0800 (PST) In-Reply-To: References: Date: Sun, 5 Jan 2014 09:23:58 -0500 Message-ID: From: "Hezekiah M. Carty" To: Martin DeMello Cc: OCaml List Content-Type: multipart/alternative; boundary=047d7bd75b8adc025704ef39e407 Subject: Re: [Caml-list] wrapping a string in an in_channel --047d7bd75b8adc025704ef39e407 Content-Type: text/plain; charset=UTF-8 On Jan 5, 2014 3:23 AM, "Martin DeMello" wrote: > > Does OCaml have any equivalent to ruby's StringIO, to wrap an > in_channel around a string and then treat it as if it were a file? > > martin > Batteries provides something similar with its BatIO.input_string function. It returns the Batteries equivalent to an in_channel. Hez --047d7bd75b8adc025704ef39e407 Content-Type: text/html; charset=UTF-8

On Jan 5, 2014 3:23 AM, "Martin DeMello" <martindemello@gmail.com> wrote:
>
> Does OCaml have any equivalent to ruby's StringIO, to wrap an
> in_channel around a string and then treat it as if it were a file?
>
> martin
>

Batteries provides something similar with its BatIO.input_string function. It returns the Batteries equivalent to an in_channel.

Hez

--047d7bd75b8adc025704ef39e407--