Module Bindoj_common.Mangling

This module provides functions that transform the format of a given string.

val snake_to_upper_camel : ?preserve_version_substring:bool -> string -> string

Takes a string in snake_case format and transforms it into UpperCamelCase.

  • parameter string

    the snake case string to convert.

  • returns

    the transformed string in UpperCamelCase format.

val snake_to_lower_camel : ?preserve_version_substring:bool -> string -> string

Takes a string in snake_case format and transforms it into lowerCamelCase.

  • parameter string

    the snake case string to convert.

  • returns

    the transformed string in lowerCamelCase format.

val cap_snake_to_kebab : ?preserve_version_substring:bool -> string -> string

Takes a string in Capitalized_b snake_case format and transforms it into kebab-case.

  • parameter string

    the capitalized snake case string to convert.

  • returns

    the transformed string in kebab-case format.

val snake_to_kebab : ?preserve_version_substring:bool -> string -> string

Takes a string in snake_case format and transforms it into kebab-case.

  • parameter string

    the snake case string to convert.

  • returns

    the transformed string in kebab-case format.