Skip to content

Latest commit

 

History

History
41 lines (31 loc) · 1.12 KB

README.md

File metadata and controls

41 lines (31 loc) · 1.12 KB

tbcd

Basic Implementation of Telephony BCD in pure GoLang

forthebadge forthebadge forthebadge

Building from source

Requires Go to be installed and configured

go get github.com/ranaaditya/tbcd

Usage

package main

import tbcd "github.com/ranaaditya/tbcd"

func main() {

    var message string = "0123456789*#abc"
    encodedmessage, err := tbcd.EncodeToTBCD(message)

    if err == nil {
        fmt.Println("Encoded Message in TBCD format is :", encodedmessage)
    } else {
        fmt.Println(err)
    }

    originalmessage, err1 := tbcd.DecodeToTBCD(encodedmessage)

    if err1 == nil {
        fmt.Println("Decoded message is :", originalmessage)
    } else {
        fmt.Println(err1)
    }

}

Get it on pkg.go.dev