Skip to content

Detecting sms info according to gsm charset gsm03.38

License

Notifications You must be signed in to change notification settings

u-mulder/go-sms-info

Folders and files

NameName
Last commit message
Last commit date

Latest commit

 

History

21 Commits
 
 
 
 
 
 
 
 
 
 
 
 
 
 

Repository files navigation

sms_info

sms-info provides essential data about sms message using text of this message as input data.

Installation

-- TODO

go get github.com/u-mulder/go-sms-info

Usage

import (
    "fmt"
    smsInfo "github.com/u-mulder/go-sms-info"
)

smsText := "Some sms text goes here"

// Create new SmsInfo struct using smsText as input
smsInfo := smsInfo.NewSmsInfo(smsText)
			
// Output struct
fmt.Printf("SmsInfo %v", smsInfo)

// Output struct's fields
fmt.Printf(
    "Sms with text '%s' has len %d, is split in %d part(s) with %d max runes per part. All chars of sms are encoded using gsm charset: %t",
    smsInfo.Text(),
    smsInfo.Len(),
    smsInfo.PartsCount(),
    smsInfo.RunesPerPart(),
    smsInfo.IsGsm(),
)

Misc

Detecting charset in php can be found here.

About

Detecting sms info according to gsm charset gsm03.38

Topics

Resources

License

Stars

Watchers

Forks

Languages