std.encoding.encoding_scheme.encode
- multiple declarations
- Function EncodingScheme.encode
- Function EncodingScheme.encode
- Function EncodingScheme.encode
- Function EncodingScheme.encode
- Function EncodingScheme.encode
- Function EncodingScheme.encode
- Function EncodingScheme.encode
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
Name | Description |
---|---|
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
Name | Description |
---|---|
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
Name | Description |
---|---|
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
Name | Description |
---|---|
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
Name | Description |
---|---|
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
Name | Description |
---|---|
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
Name | Description |
---|---|
c | the code point to be encoded |
buffer | the destination array |
Returns
the number of ubytes written.
Authors
Janice Caron