Ecosyste.ms: Awesome
An open API service indexing awesome lists of open source software.
https://github.com/u-mulder/go-sms-info
Detecting sms info according to gsm charset gsm03.38
https://github.com/u-mulder/go-sms-info
gsm gsm0338 hacktoberfest sms ucs
Last synced: 3 days ago
JSON representation
Detecting sms info according to gsm charset gsm03.38
- Host: GitHub
- URL: https://github.com/u-mulder/go-sms-info
- Owner: u-mulder
- License: mit-0
- Created: 2022-10-08T21:09:08.000Z (about 2 years ago)
- Default Branch: master
- Last Pushed: 2023-10-09T17:56:06.000Z (about 1 year ago)
- Last Synced: 2024-11-08T09:48:22.202Z (about 2 months ago)
- Topics: gsm, gsm0338, hacktoberfest, sms, ucs
- Language: Go
- Homepage:
- Size: 16.6 KB
- Stars: 1
- Watchers: 1
- Forks: 0
- Open Issues: 0
-
Metadata Files:
- Readme: README.md
- License: LICENSE
Awesome Lists containing this project
README
# 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
```golang
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](https://github.com/u-mulder/sms-charset-detector).