Documentation ¶
Overview ¶
Package iconv provides utilities to convert characters into different charsets
Index ¶
- type Converter
- func (t *Converter) Convert(reader io.Reader) io.Reader
- func (t *Converter) ConvertBytes(input []byte) ([]byte, error)
- func (t *Converter) ConvertBytesWithContext(ctx context.Context, input []byte) ([]byte, error)
- func (t *Converter) ConvertString(input string) (string, error)
- func (t *Converter) ConvertStringWithContext(ctx context.Context, input string) (transformedStr string, err error)
- func (t *Converter) String() string
- type ICharsetConverter
Constants ¶
This section is empty.
Variables ¶
This section is empty.
Functions ¶
This section is empty.
Types ¶
type Converter ¶
type Converter struct {
// contains filtered or unexported fields
}
func (*Converter) ConvertBytesWithContext ¶ added in v1.24.0
func (*Converter) ConvertStringWithContext ¶ added in v1.24.0
type ICharsetConverter ¶
type ICharsetConverter interface { // ConvertString converts the charset of an input string ConvertString(input string) (string, error) // ConvertStringWithContext converts the charset of an input string ConvertStringWithContext(ctx context.Context, input string) (string, error) // ConvertBytes converts the charset of an input byte array ConvertBytes(input []byte) ([]byte, error) // ConvertBytesWithContext converts the charset of an input byte array ConvertBytesWithContext(ctx context.Context, input []byte) ([]byte, error) // Convert converts the charset of a reader Convert(reader io.Reader) io.Reader // String describes the conversion String() string }
func NewConverter ¶
func NewConverter(fromEncoding encoding.Encoding, toEncoding encoding.Encoding) ICharsetConverter
Click to show internal directories.
Click to hide internal directories.