Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func Decode ¶
Decode decodes the passed in bytes as GSM7 encodings. Each byte is expected to be a single 7 bit GSM7 character.
func Encode ¶
Encode encodes the given UTF-8 text into a string composed of GSM7 bytes. Each 7 bit GSM7 char is encoded in a single byte
func ReplaceSubstitutions ¶
ReplaceSubstitutions replaces all the non-GSM7 characters that have valid substitutions with their GSM7 versions
func Segments ¶
Segments calculates the number of SMS segments it will take to send the passed in text. This automatically figures out if the text is GSM7 or UCS2 and then calculates how many segments it will break up into.
UCS2 messages can be 70 characters per segnment max, if more, each segment is 67 GSM7 messages can be 160 characters per segmend max, if more, each segment is 153
TODO: likely some optimizations could be made here by comparing ranges instead of map lookups
Types ¶
This section is empty.