Length of the {@link String} represented by this buffer.
Sets the length of the {@link String} represented by this buffer.
The new length.
Ensures a minimum capacity.
The minimum capacity (i.e. the expected {@link String#length length} of the {@link String} this buffer may represent).
Appends a charCode to the buffer. The length of the buffer increases by 1.
The charCode to append.
Executes a function once per charCode. See also {@link Array#forEach}
Function to execute for each charCode.
Value to use as this when executing callback.
Creates a new CharBuffer with the results of calling a provided function on every charCode. See also {@link Array#map}
Function to execute for each charCode.
Value to use as this when executing callback.
Reads the charCode at an offset.
The zero based offset.
The charCode.
Override this to observe changes.
Returns the {@link String} represented by this buffer using {@link String#fromCharCode}.
For details see:
The string.
Creates a new CharBuffer from a {@link String}.
The string.
Function that produces a charCode for the new CharBuffer from a charCode of the string parameter.
var charBuffer;
charBuffer = CharBuffer.fromString('abc');
console.log(charBuffer.toString()); // output: abc
charBuffer = CharBuffer.fromString('abc', function (charCode, index){
return charCode + 3;
});
console.log(charBuffer.toString()); // output: def
Generated using TypeDoc
AbstractCharBuffer implementation using a [Typed Array][1] (more precisely an [Uint16Array][2]).