https://github.com/m4hi2/sms-counter
SMS character counter package for Elixir
https://github.com/m4hi2/sms-counter
elixir elixir-library
Last synced: 4 months ago
JSON representation
SMS character counter package for Elixir
- Host: GitHub
- URL: https://github.com/m4hi2/sms-counter
- Owner: m4hi2
- License: mit
- Created: 2022-07-28T02:02:18.000Z (almost 4 years ago)
- Default Branch: master
- Last Pushed: 2023-03-30T17:30:52.000Z (about 3 years ago)
- Last Synced: 2025-10-21T15:41:43.241Z (8 months ago)
- Topics: elixir, elixir-library
- Language: Elixir
- Homepage: https://hex.pm/packages/sms_part_counter
- Size: 48.8 KB
- Stars: 7
- Watchers: 2
- Forks: 3
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# SmsPartCounter 
SMS Part Counter: Counts the number of SMS parts based on GSM7Bit or UCS-2 Encoding used.
The lib can automatically detect the encoding used in the text and count how many chars are
used. Based on the number of the char and encoding used, it can easily figure out how many SMS
will a particular string might be.
## Installation
The package can be installed by adding `sms_part_counter` to your list of dependencies in `mix.exs`:
```elixir
def deps do
[
{:sms_part_counter, "~> 0.1.7"}
]
end
```
## Usage
```elixir
iex> SmsPartCounter.count_parts("blah blah blah")
%{
"encoding" => "gsm_7bit",
"parts" => 1
}
```