package capitalization

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

Capitalization is a helper library for renaming strings according to case conventions.

type t =
  1. | Pascal_case
  2. | Camel_case
  3. | Snake_case
  4. | Capitalized_snake_case
  5. | Pascal_snake_case
  6. | Screaming_snake_case
  7. | Alternating_snake_case
  8. | Kebab_case
  9. | Capitalized_kebab_case
  10. | Pascal_kebab_case
  11. | Screaming_kebab_case
  12. | Alternating_kebab_case
  13. | Sentence_case
  14. | Title_case
  15. | Lower_sentence_case
  16. | Upper_sentence_case
  17. | Alternating_sentence_case
include Ppx_compare_lib.Equal.S with type t := t
val equal : t Base__Ppx_compare_lib.equal
include Ppx_enumerate_lib.Enumerable.S with type t := t
val all : t list
val sexp_of_t : t -> Sexplib0.Sexp.t
include Base.Stringable.S with type t := t
val of_string : string -> t
val to_string : t -> string
val apply_to_snake_case : t -> Base.string -> Base.string

Re-capitalizes the input string according the convention in t.

The input string is assumed to use '_' to separate words, but can contain any mix of upper/lower case characters.

val apply_to_words : t -> Base.string Base.list -> Base.string

Capitalizes the input words according to the convention in t.

val can_be : Base.string Base.list Base.Lazy.t

Contains a list of all of the options, for showing in error messages

OCaml

Innovation. Community. Security.