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

Convert trinary to string

parent 276ed127
No related branches found
No related tags found
No related merge requests found
...@@ -30,6 +30,10 @@ func (trytes Trytes) ToTrits() Trits { ...@@ -30,6 +30,10 @@ func (trytes Trytes) ToTrits() Trits {
return trits return trits
} }
func (trytes Trytes) ToString() string {
return string(trytes)
}
func (this Trits) ToBytes() []byte { func (this Trits) ToBytes() []byte {
tritsLength := len(this) tritsLength := len(this)
bytesLength := (tritsLength + NUMBER_OF_TRITS_IN_A_BYTE - 1) / NUMBER_OF_TRITS_IN_A_BYTE 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