(** Span into the buffer. *) (** Span type - offset and length into buffer. *) type t = { off : int ; len : int } (** Create a span from offset and length. *) val make : off:int -> len:int -> t (** Get offset. *) val off : t -> int (** Get length. *) val len : t -> int (** Case-sensitive comparison with string. *) val equal : Base_bigstring.t -> t -> string -> bool (** Case-insensitive comparison with string. *) val equal_caseless : Base_bigstring.t -> t -> string -> bool (** Parse decimal integer from span. Returns [-1L] on error. Note: This does NOT check for overflow. Use [parse_int64_limited] for security. *) val parse_int64 : Base_bigstring.t -> t -> int64 (** Parse decimal integer from span with overflow protection and maximum value limit. Returns (value, overflow_flag) - value: parsed value or [-1L] if empty/invalid - overflow_flag: [true] if value exceeds [max_value] or has too many digits *) val parse_int64_limited : Base_bigstring.t -> t -> max_value:int64 -> int64 * bool (** Copy span to string. Allocates. *) val to_string : Base_bigstring.t -> t -> string (** Copy span to bytes. Allocates. *) val to_bytes : Base_bigstring.t -> t -> bytes (** Pretty-print span contents using buffer. *) val pp_with_buf : Base_bigstring.t -> Stdlib.Format.formatter -> t -> unit (** Pretty-print span structure (offset and length). *) val pp : Stdlib.Format.formatter -> t -> unit