(input string)
| 109 | } |
| 110 | |
| 111 | func (e *Encoder) EncodeAllToLowerSpecial(input string) ([]byte, error) { |
| 112 | chars := make([]byte, len(input)+countUppers(input)) |
| 113 | idx := 0 |
| 114 | for i := 0; i < len(input); i++ { |
| 115 | if input[i] >= 'A' && input[i] <= 'Z' { |
| 116 | chars[idx] = '|' |
| 117 | chars[idx+1] = input[i] - 'A' + 'a' |
| 118 | idx += 2 |
| 119 | } else { |
| 120 | chars[idx] = input[i] |
| 121 | idx += 1 |
| 122 | } |
| 123 | } |
| 124 | return e.EncodeGeneric(chars, 5) |
| 125 | } |
| 126 | |
| 127 | func (e *Encoder) EncodeGeneric(chars []byte, bitsPerChar int) (result []byte, err error) { |
| 128 | totBits := len(chars)*bitsPerChar + 1 |
no test coverage detected