View Source Dragon.English (dragon v1.2.3)
Link to this section Summary
Functions
iex> oxford_comma([]) "" iex> oxford_comma(["one"]) "one" iex> oxford_comma(["one", "two"]) "one, and two" iex> oxford_comma(["one", "two", "three", "four"]) "one, two, three, and four" iex> oxford_comma(["one", "two", "three", "four"], "or") "one, two, three, or four"
iex> plural("red") "reds" iex> plural("redy") "redies" iex> plural("rey") "reys" iex> plural("rex") "rexes" iex> plural("rech") "reches"
iex> plural("red", [1]) "red" iex> plural("red", [1,1]) "reds"
Link to this section Functions
iex> oxford_comma([]) "" iex> oxford_comma(["one"]) "one" iex> oxford_comma(["one", "two"]) "one, and two" iex> oxford_comma(["one", "two", "three", "four"]) "one, two, three, and four" iex> oxford_comma(["one", "two", "three", "four"], "or") "one, two, three, or four"
iex> plural("red") "reds" iex> plural("redy") "redies" iex> plural("rey") "reys" iex> plural("rex") "rexes" iex> plural("rech") "reches"
iex> plural("red", [1]) "red" iex> plural("red", [1,1]) "reds"