Methods
add(objectToAdd)
Adds a special character object to the CharCollection object
Parameters:
| Name | Type | Description |
|---|---|---|
objectToAdd |
Object | The object to be added to the collection. |
- Source:
getLength() → {Number}
The getLength method returns the number of SpecialCharacter objects
in the CharCollection object.
- Source:
Returns:
The number of SpecialCharacter objects
in the CharCollection object.
- Type
- Number
inspectChar(char_in) → {String}
inspectChar is a method that is the lower level of the process
of creating text for the right hand text box. This function
examines each special character object in the _collection array.
If a special character object is found that has the same plain
text as the incoming character, then the special character's
percent code is returned. If no matches are found, the the
incoming character is returned.
Parameters:
| Name | Type | Description |
|---|---|---|
char_in |
String | The incoming character. |
- Source:
Returns:
Either a single character or a percent code.
- Type
- String
logCollection()
logCollection sends a description of the CharCollection to the
console.
- Source:
remove(objectToRemove)
remove removes a SpecialCharacter object from the CharCollection.
Parameters:
| Name | Type | Description |
|---|---|---|
objectToRemove |
Object | The object to be removed. |
- Source: