package ppx_string

  1. Overview
  2. Docs
Ppx extension for string interpolation

Install

Dune Dependency

Authors

Maintainers

Sources

v0.17.0.tar.gz
sha256=06b4e061fb5e2b2a85298c9829cc31a1af0a9b8e63fdee9048c76ec8d52d16ef

doc/src/ppx_string.runtime/ppx_string_runtime.ml.html

Source file ppx_string_runtime.ml

1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
open Stdlib
open StdLabels

module type S = Ppx_string_runtime_intf.S

module For_string = struct
  let empty = ""
  let of_string t = t
  let convert t = t
  let concat list = String.concat ~sep:"" list

  let pad t ~len =
    let n = String.length t in
    if n >= len then t else String.make (len - n) ' ' ^ t
  ;;

  external identity : string -> string = "%identity"
end
OCaml

Innovation. Community. Security.