Ocamlnet 3 Reference Manual : Netchannels.input_string

# Class Netchannels.input_string

    class input_string : ?pos:int -> ?len:int -> string -> in_obj_channel

Creates an input channel from a (constant) string.

The method `pos_in` reflects the real position in the string, i.e. a character read at position `k` can be found at `s.[k]` in the string `s`.

`pos` : The data of the channel begins at this position of the string. Default: 0
`len` : The data of the channel consists of this number of bytes. Default: until the end of the string