package core

  1. Overview
  2. Docs
Industrial strength alternative to OCaml's standard library

Install

Dune Dependency

Authors

Maintainers

Sources

core-v0.14.0.tar.gz
sha256=08447e7d539b69d13b2633c61bab5fdb81624b1391540be097a6a91023f9ce33
md5=571dc65fff922c86951068d66e4a05ca

doc/core.iobuf_unix/Iobuf_unix/Expert/index.html

Module Iobuf_unix.Expert

The Expert module is for building efficient out-of-module Iobuf abstractions.

val fillf_float : (Core.read_write, Iobuf.seek) Iobuf.t -> c_format:string -> float -> [ `Ok | `Truncated | `Format_error ]

fillf_float t ~c_format float attempts to fill a string representation of a float into an iobuf at the current position. The representation is specified by standard C printf formatting codes.

The highest available byte of the window is unusable and will be set to 0 in the case that a properly formatted string would otherwise fully fill the window.

If there is enough room in (window - 1) to format the float as specified then `Ok is returned and the window is advanced past the written bytes.

If there is not enough room in (window - 1) to format as specified then `Truncated is returned.

If C snprintf indicates a format error then `Format_error is returned.

Operation is unsafe if a format code not intended for a double precision float is used (e.g., %s) or if more than one format specifier is provided, etc.

val to_iovec_shared : ?pos:int -> ?len:int -> (_, _) Iobuf.t -> Core.Bigstring.t Core.Unix.IOVec.t
OCaml

Innovation. Community. Security.