Class: CharBuf

CharBuf


new CharBuf(str)

A character buffer class that consumes characters and tracks previous and next characters

Parameters:
Name Type Description
str string

The string to use as the raw data for the buffer

Source:

Members


charNxt

Properties:
Name Type Description
The Array

next characters (0 = the next character, 1 = the next-next character ...)

Source:
To Do:
  • Write unit test

charPre

Properties:
Name Type Description
The Array

previous characters in reverse order (0 = the last character, 1 = the next to last ...)

Source:
To Do:
  • Write unit test

Methods


consume()

Consumes a character from the string and increments the index

Source:
To Do:
  • Write unit test
Returns:

The character consumed

Type
string