Implement blank ucs2 coder
This commit is contained in:
@@ -4,10 +4,16 @@ import "bytes"
|
|||||||
|
|
||||||
type UCS2Coder struct{}
|
type UCS2Coder struct{}
|
||||||
|
|
||||||
func (c *UCS2Coder) Encode(s string, buf *bytes.Buffer) {
|
func (c *UCS2Coder) Encode(s *string, buf *bytes.Buffer) error {
|
||||||
|
panic("UCS2 not implemented yet")
|
||||||
|
}
|
||||||
|
func (c *UCS2Coder) Decode(buf *bytes.Buffer) (string, error) {
|
||||||
panic("UCS2 not implemented yet")
|
panic("UCS2 not implemented yet")
|
||||||
}
|
}
|
||||||
|
|
||||||
func (c *UCS2Coder) Decode(buf *bytes.Buffer) string {
|
func (c UCS2Coder) EncodesInto(s *string) int {
|
||||||
panic("UCS2 not implemented yet")
|
return len(*s) * 2
|
||||||
|
}
|
||||||
|
func (c UCS2Coder) DecodesInto(buf *bytes.Buffer) int {
|
||||||
|
return buf.Len() / 2
|
||||||
}
|
}
|
||||||
|
Reference in New Issue
Block a user