Documentation ¶
Index ¶
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
func ConvertUTF8ToShiftJIS ¶
ConvertUTF8ToShiftJIS converts a UTF8 string to a Shift-JIS []byte.
Types ¶
type StringConverter ¶
StringConverter is a small helper for encoding/decoding strings.
func (*StringConverter) Decode ¶
func (sc *StringConverter) Decode(data []byte) (string, error)
Decode decodes the given bytes as the set encoding.
func (*StringConverter) Encode ¶
func (sc *StringConverter) Encode(data string) ([]byte, error)
Encode encodes the given string as the set encoding.
func (*StringConverter) MustDecode ¶
func (sc *StringConverter) MustDecode(data []byte) string
MustDecode decodes the given bytes as the set encoding. Panics on decode failure.
func (*StringConverter) MustEncode ¶
func (sc *StringConverter) MustEncode(data string) []byte
MustEncode encodes the given string as the set encoding. Panics on encode failure.
Click to show internal directories.
Click to hide internal directories.