<ruby id="bdb3f"></ruby>

    <p id="bdb3f"><cite id="bdb3f"></cite></p>

      <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
        <p id="bdb3f"><cite id="bdb3f"></cite></p>

          <pre id="bdb3f"></pre>
          <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

          <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
          <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

          <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                <ruby id="bdb3f"></ruby>

                ThinkChat2.0新版上線,更智能更精彩,支持會話、畫圖、視頻、閱讀、搜索等,送10W Token,即刻開啟你的AI之旅 廣告
                # package hex `import "encoding/hex"` hex包實現了16進制字符表示的編解碼。 ## Index * [Variables](#pkg-variables) * [type InvalidByteError](#InvalidByteError) * [func (e InvalidByteError) Error() string](#InvalidByteError.Error) * [func DecodedLen(x int) int](#DecodedLen) * [func Decode(dst, src []byte) (int, error)](#Decode) * [func DecodeString(s string) ([]byte, error)](#DecodeString) * [func EncodedLen(n int) int](#EncodedLen) * [func Encode(dst, src []byte) int](#Encode) * [func EncodeToString(src []byte) string](#EncodeToString) * [func Dump(data []byte) string](#Dump) * [func Dumper(w io.Writer) io.WriteCloser](#Dumper) ## Variables ``` var ErrLength = errors.New("encoding/hex: odd length hex string") ``` 解碼一個長度為奇數的切片時,將返回此錯誤。 ## type [InvalidByteError](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L37 "View Source") ``` type InvalidByteError byte ``` 描述一個hex編碼字符串中的非法字符。 ### func (InvalidByteError) [Error](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L39 "View Source") ``` func (e InvalidByteError) Error() string ``` ## func [DecodedLen](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L43 "View Source") ``` func DecodedLen(x int) int ``` 長度x的編碼數據解碼后的明文數據的長度 ## func [Decode](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L49 "View Source") ``` func Decode(dst, src []byte) (int, error) ``` 將src解碼為DecodedLen(len(src))字節,返回實際寫入dst的字節數;如遇到非法字符,返回描述錯誤的error。 ## func [DecodeString](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L91 "View Source") ``` func DecodeString(s string) ([]byte, error) ``` 返回hex編碼的字符串s代表的數據。 ## func [EncodedLen](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L18 "View Source") ``` func EncodedLen(n int) int ``` 長度x的明文數據編碼后的編碼數據的長度。 ## func [Encode](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L24 "View Source") ``` func Encode(dst, src []byte) int ``` 將src的數據解碼為EncodedLen(len(src))字節,返回實際寫入dst的字節數:EncodedLen(len(src))。 ## func [EncodeToString](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L84 "View Source") ``` func EncodeToString(src []byte) string ``` 將數據src編碼為字符串s。 ## func [Dump](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L103 "View Source") ``` func Dump(data []byte) string ``` 返回給定數據的hex dump格式的字符串,這個字符串與控制臺下`hexdump -C`對該數據的輸出是一致的。 ## func [Dumper](https://github.com/golang/go/blob/master/src/encoding/hex/hex.go#L114 "View Source") ``` func Dumper(w io.Writer) io.WriteCloser ``` 返回一個io.WriteCloser接口,將寫入的數據的hex dump格式寫入w,具體格式為'hexdump -C'。
                  <ruby id="bdb3f"></ruby>

                  <p id="bdb3f"><cite id="bdb3f"></cite></p>

                    <p id="bdb3f"><cite id="bdb3f"><th id="bdb3f"></th></cite></p><p id="bdb3f"></p>
                      <p id="bdb3f"><cite id="bdb3f"></cite></p>

                        <pre id="bdb3f"></pre>
                        <pre id="bdb3f"><del id="bdb3f"><thead id="bdb3f"></thead></del></pre>

                        <ruby id="bdb3f"><mark id="bdb3f"></mark></ruby><ruby id="bdb3f"></ruby>
                        <pre id="bdb3f"><pre id="bdb3f"><mark id="bdb3f"></mark></pre></pre><output id="bdb3f"></output><p id="bdb3f"></p><p id="bdb3f"></p>

                        <pre id="bdb3f"><del id="bdb3f"><progress id="bdb3f"></progress></del></pre>

                              <ruby id="bdb3f"></ruby>

                              哎呀哎呀视频在线观看