Skip to content

Latest commit

 

History

History
28 lines (22 loc) · 742 Bytes

README.md

File metadata and controls

28 lines (22 loc) · 742 Bytes

SmsPartCounter Testing

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:

def deps do
  [
    {:sms_part_counter, "~> 0.1.7"}
  ]
end

Usage

iex> SmsPartCounter.count_parts("blah blah blah")
%{
  "encoding" => "gsm_7bit",
  "parts" => 1
}