Skip to content
Snippets Groups Projects
Commit fdb3349b authored by Wolfgang Welz's avatar Wolfgang Welz
Browse files

Convert trinary to string

parent 276ed127
Branches
Tags
No related merge requests found
......@@ -30,6 +30,10 @@ func (trytes Trytes) ToTrits() Trits {
return trits
}
func (trytes Trytes) ToString() string {
return string(trytes)
}
func (this Trits) ToBytes() []byte {
tritsLength := len(this)
bytesLength := (tritsLength + NUMBER_OF_TRITS_IN_A_BYTE - 1) / NUMBER_OF_TRITS_IN_A_BYTE
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment