Liking cljdoc? Tell your friends :D

helins.binf.string

Decoding a string directly to a buffer and vice-versa.

Decoding a string directly to a buffer and vice-versa.
raw docstring

decodeclj/s

(decode buffer)
(decode buffer decoder)

Interprets the given buffer as a string.

Defaults to UTF-8.

See decoder.

Interprets the given `buffer` as a string.

Defaults to UTF-8.

See [[decoder]].
sourceraw docstring

decoderclj/s

(decoder encoding)

A decoder knows how to translate a buffer into a string given an encoding.

Supported cross-platform encodings are:

"iso-8859-1" "utf-8" "utf-16be" "utf-16le"

Other encodings are platform dependent. On the JVM, it can be anything accepted by the Charset class while in JS it can be anything accepted by a TextDecoder.

Throws if the encoding is not supported.

A decoder knows how to translate a buffer into a string given an encoding.

Supported cross-platform encodings are:

  "iso-8859-1"
  "utf-8"
  "utf-16be"
  "utf-16le"

Other encodings are platform dependent. On the JVM, it can be anything accepted
by the `Charset` class while in JS it can be anything accepted by a `TextDecoder`.

Throws if the encoding is not supported.
sourceraw docstring

decoder-utf-8clj/s

Default decoder used by this library (UTF-8).

Default decoder used by this library (UTF-8).
sourceraw docstring

encodeclj/s≠

clj
(encode string)
(encode string encoder)
cljs
(encode string)

Returns a buffer containing the given string encoded in UTF-8.

On the JVM, an alternative encoder can be provided (see encoder).

Returns a buffer containing the given `string` encoded in UTF-8.

On the JVM, an alternative encoder can be provided (see [[encoder]]).
sourceraw docstring

encoderclj

(encoder encoding)

An encoder knows how to translate into a buffer a string encoded in a given encoding.

In JS, strings can only be encoded as UTF-8 which is why string encoding utilities from this library use exclusively UTF-8.

However, on the JVM, any encoding can be used in encode.

See decoder for available encodings.

An encoder knows how to translate into a buffer a string encoded in a given encoding.

In JS, strings can only be encoded as UTF-8 which is why string encoding utilities
from this library use exclusively UTF-8.

However, on the JVM, any encoding can be used in [[encode]].

See [[decoder]] for available encodings.
sourceraw docstring

encoder-utf-8clj/s

Default encoder used by this library (UTF-8).

Default encoder used by this library (UTF-8).
source (clj)source (cljs)raw docstring

cljdoc is a website building & hosting documentation for Clojure/Script libraries

× close