Class Index | File Index

Classes


Class StringMapper

Create a new string mapper instance.

The options may contain any of the following properties:


Defined in: StringMapper.js.

Class Summary
Constructor Attributes Constructor Name and Description
 
StringMapper(options)
Method Summary
Method Attributes Method Name and Description
 
Return the locale that this mapper was constructed.
 
map(string)
Map a string using the mapping defined in the constructor.
Class Detail
StringMapper(options)
Parameters:
{Object=} options
options to initialize this string mapper
Method Detail
getLocale()
Return the locale that this mapper was constructed.
Returns:

{string|IString|undefined} map(string)
Map a string using the mapping defined in the constructor. This method iterates through all characters in the string and maps them one-by-one. If a particular character has a mapping, the mapping result will be added to the output. If there is no mapping, but there is a mapFunction defined, the mapFunction results will be added to the result. Otherwise, the original character from the input string will be added to the result.
Parameters:
{string|IString|undefined} string
Returns:
{string|IString|undefined}

Documentation generated by JsDoc Toolkit 2.4.0 on Tue Jan 17 2023 15:56:28 GMT-0800 (Pacific Standard Time)