gsm7

package
v0.0.197 Latest Latest
Warning

This package is not in the latest version of its module.

Go to latest
Published: May 10, 2019 License: AGPL-3.0 Imports: 0 Imported by: 1

Documentation

Index

Constants

This section is empty.

Variables

This section is empty.

Functions

func IsValid

func IsValid(text string) bool

IsValid returns whether the passed in string is made up of entirely GSM7 characters

func Segments

func Segments(text string) int

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.

Jump to

Keyboard shortcuts

? : This menu
/ : Search site
f or F : Jump to
y or Y : Canonical URL