The initial capacity (i.e. the expected {@link String#length length} of the {@link String} represented by this buffer).
Length of the {@link String} represented by this buffer.
Sets the length of the {@link String} represented by this buffer.
The new length.
Indicates whether this CharBuffer is supported by the current platform.
Appends a charCode to the buffer. The length of the buffer increases by 1.
The charCode to append.
Reads the char at an offset.
The zero based offset.
The char.
Reads the charCode at an offset.
The zero based offset.
The charCode.
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.
Writes a charCode to the buffer at an offset.
charCode The charCode to write.
offset The zero based offset to write at.
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
Base class for all CharBuffers.