encodedText.go 259 B

123456789101112131415
  1. package main
  2. import (
  3. "fmt"
  4. "strings"
  5. )
  6. type EncodedText struct {
  7. text string
  8. encodedWords []string
  9. }
  10. func (e EncodedText) String() string {
  11. return fmt.Sprintf("\n---weird---\n%s\n---weird---\n%v", e.text, strings.Join(e.encodedWords, " "))
  12. }