curtail alternatives and similar packages
Based on the "Text and Numbers" category.
Alternatively, view curtail alternatives based on common mentions on social networks and blogs.
-
money
Elixir library for working with Money safer, easier, and fun... Is an interpretation of the Fowler's Money pattern in fun.prog. -
nanoid
Elixir port of NanoID, a secure and URL-friendly unique ID generator. https://hex.pm/packages/nanoid -
secure_random
Convenience library for random base64 strings modeled after my love for Ruby's SecureRandom -
chinese_translation
An elixir module to translate simplified Chinese to traditional Chinese, and vice versa, based on wikipedia data -
inet_cidr
CIDR library for Elixir that is compatible with Erlang's :inet and supports both IPv4 and IPv6 -
Ex_Cldr_Units
Unit formatting (volume, area, length, ...) functions for the Common Locale Data Repository (CLDR) -
minigen
Pure random data generation library, appropriate for realistic simulations in the Erlang ecosystem
InfluxDB - Purpose built for real-time analytics at any scale.
Do you think we are missing an alternative of curtail or a related project?
Popular Comparisons
README
Curtail
HTML tag safe string truncation.
Port of the html_truncate gem.
Installation
def deps do
[ {:curtail, "~> 1.0"} ]
end
Usage
Options
* length (default: 100)
* omission (default: "...")
* word_boundary (default: "~r/\S/")
* break_token (default: nil)
Truncate using default options:
iex> Curtail.truncate("<p>Truncate me!</p>")
"<p>Truncate me!</p>"
Truncate with custom length:
iex> Curtail.truncate("<p>Truncate me!</p>", length: 12)
"<p>Truncate...</p>"
Truncate without omission string:
iex> Curtail.truncate("<p>Truncate me!</p>", omission: "", length: 8)
"<p>Truncate</p>"
Truncate with custom word_boundary:
iex> Curtail.truncate("<p>Truncate. Me!</p>", word_boundary: ~r/\S[\.]/, length: 12, omission: "")
"<p>Truncate.</p>"
Truncate without word boundary:
iex> Curtail.truncate("<p>Truncate me</p>", word_boundary: false, length: 7)
"<p>Trun...</p>"
Truncate with custom break_token:
iex> Curtail.truncate("<p>This should be truncated here<break_here>!!</p>", break_token: "<break_here>")
"<p>This should be truncated here</p>"
License
Released under MIT License.
*Note that all licence references and agreements mentioned in the curtail README section above
are relevant to that project's source code only.