Length of the {@link String} represented by this buffer.
Sets the length of the {@link String} represented by this buffer.
The new length.
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.
Write a charCode to the buffer using {@link String#fromCharCode} and {@link Array#push []}.
The charCode to append.
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
AbstractCharBuffer implementation using an {@link Array} of {@link String}s.