numero alternatives and similar packages
Based on the "Text and Numbers" category.
Alternatively, view numero 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 -
veritaserum
Sentiment analysis based on afinn-165, emojis and some enhancements. -
abacus
Parses and evaluates mathematical expressions in Elixir. Inspired by math.js -
inet_cidr
CIDR library for Elixir that is compatible with Erlang's :inet and supports both IPv4 and IPv6 -
haikunator
Generate Heroku-like memorable random names to use in your apps or anywhere else. -
Ex_Cldr_Units
Unit formatting (volume, area, length, ...) functions for the Common Locale Data Repository (CLDR) -
mt940
MT940 (standard structured SWIFT Customer Statement message) parser for Elixir.
TestGPT | Generating meaningful tests for busy devs
Do you think we are missing an alternative of numero or a related project?
Popular Comparisons
README
Numero
A micro library for converting non-english UTF8 digits. (like ۱=1, ۲=2)
Supported languages
Almost all numbers defined in Unicode is supported in Numero.
For more info on supported characters you can visit here
Installation
Numero can be installed
by adding numero
to your list of dependencies in mix.exs
:
def deps do
[{:numero, "~> 0.3.0"}]
end
Using Numero
On strings for strings:
result = Numero.normalize("1۲۳۰4a۳tس")
# result = "12304a3tس"
Smart numeric convert:
(Convert numbers to Integer or Float based on input string)
result = Numero.normalize_as_number("1۲۳۰4۳")
# result = {:ok, 123043}
result = Numero.normalize_as_number("1۲۳۰4۳.۴5")
# result = {:ok, 123043.45}
result = Numero.normalize_as_number!("1۲۳۰4۳.۴5")
# result = 123043.45
Strip all non numeric chars from a string:
result = Numero.remove_non_digits("12 345abs")
# result = "12345"
# Or even make exceptions for some chars like 'a' and ' ' (space)
result = Numero.remove_non_digits("12 345bas", ~c[a ])
# result = "12 345a"
Checking if a string is all numbers
result = Numero.digit_only?("1234567890")
# result = true
result = Numero.digit_only?("1234567890.a")
# result = false