package ocaml-base-compiler

  1. Overview
  2. Docs
Official release 5.2.1

Install

Dune Dependency

Authors

Maintainers

Sources

ocaml-5.2.1.tar.gz
sha256=2d0f8090951a97a2c0e5b8a11e90096c0e1791d2e471e4a67f87e3b974044cd0

doc/odoc_info/Odoc_info/Name/index.html

Module Odoc_info.Name

Representation of element names.

type t = string
val simple : t -> t

Access to the simple name.

val concat : t -> t -> t

concat t1 t2 returns the concatenation of t1 and t2.

val depth : t -> int

Return the depth of the name, i.e. the number of levels to the root. Example : depth "Toto.Tutu.name" = 3.

val get_relative : t -> t -> t

Take two names n1 and n2 = n3.n4 and return n4 if n3=n1 or else n2.

val get_relative_opt : t -> t -> t

Take two names n1 and n2 = n3.n4 and return n4 if n3=n1 and n1<>"" or else n2.

val father : t -> t

Return the name of the 'father' (like dirname for a file name).

OCaml

Innovation. Community. Security.