package codept-lib

  1. Overview
  2. Docs
Legend:
Page
Library
Module
Module type
Parameter
Class
Class type
Source

Module SupportSource

Support module for recently introduced function in stdlib

Sourceval extension : string -> string

extension name is the shortest suffix ext of name0 where:

  • name0 is the longest suffix of name that does not contain a directory separator;
  • ext does not starts with a period (such as name0 ^ "." ^ ext = name)
  • ext plus the dot is preceded by at least one non-period character in name0.

If such a suffix does not exist, extension name is the empty string.

Sourceval remove_extension : string -> string

Return the given file name without its extension, as defined in extension. If the extension is empty, the function returns the given file name.

The following invariant holds for any file name s: remove_extension s ^ "." ^ extension s = s

Sourceval split_on_char : char -> string -> string list
Sourceval split_on_dirs : string -> string list

split_on_dirs path splits the file path path on the platform's directory seperator and on forward slashes (/).

Forward slashes are always included as a split character because on Windows the predominant means of accessing OCaml is through a Unix emulation shell (Cygwin or MSYS2).

Sourceval opt : ('a -> 'b) -> 'a -> 'b option
Sourceval filter_map : ('a -> 'b option) -> 'a list -> 'b list
Sourceval is_upper : char -> bool

OCaml identifier rules

Sourceval is_lower : char -> bool
Sourceval is_valid_module_char : char -> bool
Sourcemodule Map : sig ... end