Commits

camlspotter  committed 97105fe

added xbuffer

  • Participants
  • Parent commits 94fec83
  • Branches release-2.4.0

Comments (0)

Files changed (5)

 
 * Temporal.Date.yday now returns 0--365, not 1--366!
 - Added String.{find_with_pos_opt,split1}
+- Added Buffer.with_buffer
 
 2.4.0
 ---------------

File lib/OMakefile

    xset
    xint64
    xprintexc
+   xbuffer
 #   phantom
    weaktbl
    hashset
 module Backref = Backref
 
 module Shell = Shell
+
+module Buffer = struct
+  include Buffer
+  include Xbuffer
+end

File lib/xbuffer.ml

+let with_buffer len f = 
+  let buf = Buffer.create len in
+  f buf;
+  Buffer.contents buf

File lib/xbuffer.mli

+val with_buffer : int -> (Buffer.t -> unit) -> string