Skip to content

Commit

Permalink
ConvString
Browse files Browse the repository at this point in the history
  • Loading branch information
xushiwei committed Jun 26, 2020
1 parent c3fd079 commit e4f807f
Showing 1 changed file with 2 additions and 1 deletion.
3 changes: 2 additions & 1 deletion iconv.go
Original file line number Diff line number Diff line change
Expand Up @@ -82,7 +82,8 @@ func (cd Iconv) Conv(b []byte, outbuf []byte) (out []byte, inleft int, err error
// ConvString converts string to requested character encoding.
func (cd Iconv) ConvString(s string) string {
var outbuf [512]byte
if s1, _, err := cd.Conv([]byte(s), outbuf[:]); err != nil {
s1, _, err := cd.Conv([]byte(s), outbuf[:])
if err != nil {
return ""
}
return string(s1)
Expand Down

0 comments on commit e4f807f

Please sign in to comment.