View Source textual (textual v0.1.0)

Link to this section Summary

Types

Options for customizing title case.

Functions

Convert a text to title case.

Link to this section Types

-type titlecase_opts() :: #{style => apa, abbr => keep | capitalize}.

Options for customizing title case.

Title style can be one of:
  • apa (American Psychological Association)
abbr specifies how abbreviations (all uppercase words) are handled:
  • keep abbreviations as is
  • capitalize them as normal words (i.e. lower case with capital first letter)

Link to this section Functions

-spec titlecase(iodata()) -> iodata().

Equivalent to titlecase(String, #{}).

-spec titlecase(iodata(), titlecase_opts()) -> iodata().

Convert a text to title case.

Converts all sentences in the input string to title case (sentences are text delimited with . or :).