View source code Display the source code in std/encoding.d from which this page was generated on github. Improve this page Quickly fork, edit online, and submit a pull request for this page. Requires a signed-in GitHub account. This works well for small changes. If you'd like to make larger changes you may want to consider using local clone. Page wiki View or edit the community-maintained wiki page associated with this page.

std.encoding.encoding_scheme.encode - multiple declarations

Function EncodingScheme.encode

Encodes a single code point into a user-supplied, fixed-size buffer.

This function encodes a single code point into one or more ubytes. The supplied buffer must be code unit aligned. (For example, UTF-16LE or UTF-16BE must be wchar-aligned, UTF-32LE or UTF-32BE must be dchar-aligned, etc.)

The input to this function MUST be a valid code point.

Prototype

abstract ulong encode(
  dchar c,
  ubyte[] buffer
) const;

Parameters

NameDescription
c the code point to be encoded
buffer the destination array

Returns

the number of ubytes written.

Function EncodingScheme.encode

Encodes a single code point into a user-supplied, fixed-size buffer.

This function encodes a single code point into one or more ubytes. The supplied buffer must be code unit aligned. (For example, UTF-16LE or UTF-16BE must be wchar-aligned, UTF-32LE or UTF-32BE must be dchar-aligned, etc.)

The input to this function MUST be a valid code point.

Prototype

abstract ulong encode(
  dchar c,
  ubyte[] buffer
) const;

Parameters

NameDescription
c the code point to be encoded
buffer the destination array

Returns

the number of ubytes written.

Function EncodingScheme.encode

Encodes a single code point into a user-supplied, fixed-size buffer.

This function encodes a single code point into one or more ubytes. The supplied buffer must be code unit aligned. (For example, UTF-16LE or UTF-16BE must be wchar-aligned, UTF-32LE or UTF-32BE must be dchar-aligned, etc.)

The input to this function MUST be a valid code point.

Prototype

abstract ulong encode(
  dchar c,
  ubyte[] buffer
) const;

Parameters

NameDescription
c the code point to be encoded
buffer the destination array

Returns

the number of ubytes written.

Function EncodingScheme.encode

Encodes a single code point into a user-supplied, fixed-size buffer.

This function encodes a single code point into one or more ubytes. The supplied buffer must be code unit aligned. (For example, UTF-16LE or UTF-16BE must be wchar-aligned, UTF-32LE or UTF-32BE must be dchar-aligned, etc.)

The input to this function MUST be a valid code point.

Prototype

abstract ulong encode(
  dchar c,
  ubyte[] buffer
) const;

Parameters

NameDescription
c the code point to be encoded
buffer the destination array

Returns

the number of ubytes written.

Function EncodingScheme.encode

Encodes a single code point into a user-supplied, fixed-size buffer.

This function encodes a single code point into one or more ubytes. The supplied buffer must be code unit aligned. (For example, UTF-16LE or UTF-16BE must be wchar-aligned, UTF-32LE or UTF-32BE must be dchar-aligned, etc.)

The input to this function MUST be a valid code point.

Prototype

abstract ulong encode(
  dchar c,
  ubyte[] buffer
) const;

Parameters

NameDescription
c the code point to be encoded
buffer the destination array

Returns

the number of ubytes written.

Function EncodingScheme.encode

Encodes a single code point into a user-supplied, fixed-size buffer.

This function encodes a single code point into one or more ubytes. The supplied buffer must be code unit aligned. (For example, UTF-16LE or UTF-16BE must be wchar-aligned, UTF-32LE or UTF-32BE must be dchar-aligned, etc.)

The input to this function MUST be a valid code point.

Prototype

abstract ulong encode(
  dchar c,
  ubyte[] buffer
) const;

Parameters

NameDescription
c the code point to be encoded
buffer the destination array

Returns

the number of ubytes written.

Function EncodingScheme.encode

Encodes a single code point into a user-supplied, fixed-size buffer.

This function encodes a single code point into one or more ubytes. The supplied buffer must be code unit aligned. (For example, UTF-16LE or UTF-16BE must be wchar-aligned, UTF-32LE or UTF-32BE must be dchar-aligned, etc.)

The input to this function MUST be a valid code point.

Prototype

abstract ulong encode(
  dchar c,
  ubyte[] buffer
) const;

Parameters

NameDescription
c the code point to be encoded
buffer the destination array

Returns

the number of ubytes written.

Authors

Janice Caron

License

Boost License 1.0.

Comments