package tezos-protocol-012-Psithaca

  1. Overview
  2. Docs
Legend:
Library
Module
Module type
Parameter
Class
Class type
type t = private string

A string that is guaranteed to be non-empty

val (=) : t -> t -> bool
val (<>) : t -> t -> bool
val (<) : t -> t -> bool
val (<=) : t -> t -> bool
val (>=) : t -> t -> bool
val (>) : t -> t -> bool
val compare : t -> t -> int
val equal : t -> t -> bool
val max : t -> t -> t
val min : t -> t -> t
val of_string : string -> t option

Returns None if the original string is empty.

val of_string_exn : string -> t

Fails with Invalid_argument if the original string is empty.

val cat2 : t -> ?sep:string -> t -> t

cat2 a b concatenates a and b. cat2 a ~sep b concatenates a, sep, and b.

val split_on_last : char -> t -> (t * t) option

split_on_last c s finds the last occurrence of c in s and returns the substring before and the substring after. Returns None if c is not present in s or if one or both substrings would end up being empty.

OCaml

Innovation. Community. Security.