Module: ink/strings/binary

ink/strings/binary

Binary, ByteArray and ByteString classes as defined in CommonJS Binary/B. This file is included in ink-strings primarily to support the base64 encoding methods in module:ink/strings/base64. But they are still a valuable set of tools if you need 'em.

Author:
Source:

Classes

Binary
ByteArray
ByteString

Members

<inner> encodings

The valid set of encoding supported by this library

Properties:
Name Type Description
US-ASCII string

'ascii'

UTF-8 string

'utf8'

ISO-10646-UCS-2 string

'ucs2'

Source:

Methods

<static> toByteArray(str, charset) → {ByteArray}

Converts the String to a mutable ByteArray using the specified encoding.

Parameters:
Name Type Description
str string

The string to convert

charset String

the name of the string encoding. Defaults to 'UTF-8'

Source:
Returns:

a ByteArray representing the string

Type
ByteArray

<static> toByteString(str, charset) → {ByteString}

Converts the String to an immutable ByteString using the specified encoding.

Parameters:
Name Type Description
str string

The string to convert

charset String

the name of the string encoding. Defaults to 'UTF-8'

Source:
Returns:

a ByteString representing the string

Type
ByteString
See NOTICE.md for licenses
ink-strings Copyright contributers to ink-strings, base64, Helma, RingoJS, sprintf projects.
Documentation generated by JSDoc 3.2.0-dev on Sun Jun 09 2013 11:56:07 GMT-0400 (EDT) using the DocStrap template.