package core_extended

  1. Overview
  2. Docs
val maybe_escape_field : ?quote:char -> ?sep:char -> string -> string

Escape the a CSV field if need be.

val escape_field : ?quote:char -> string -> string

Escape a CSV (even if doesn't have any characters that require escaping).

val quote_len : quote:char -> sep:char -> pos:int -> len:int -> string -> int option

Get the escaped length of one quoted field (without the quotes). Returns None if the field doesn't need to be escaped.

val quote_blit : quote:char -> src:string -> dst:Core.Bytes.t -> src_pos:int -> dst_pos:int -> len:int -> int

Copy and escapes the content of a field over from one string to another. This does not put the quotes in.


Innovation. Community. Security.