new CharacterDefinition()
CharacterDefinition represents char.def file and
defines behavior of unknown word processing
- Source:
Methods
-
<static> load(cat_map_buffer, compat_cat_map_buffer, invoke_def_buffer) → {CharacterDefinition}
-
Load CharacterDefinition
Parameters:
Name Type Description cat_map_buffer
Uint8Array compat_cat_map_buffer
Uint32Array invoke_def_buffer
InvokeDefinitionMap - Source:
Returns:
- Type
- CharacterDefinition
-
<static> readCharacterDefinition(text)
-
Factory method of CharacterDefinition
Parameters:
Name Type Description text
string Contents of char.def - Source:
-
initCategoryMappings(category_mapping)
-
Initializing method
Parameters:
Name Type Description category_mapping
Array Array of category mapping - Source:
-
lookup(ch) → {CharacterClass}
-
Lookup category for a character
Parameters:
Name Type Description ch
string UCS2 character (just 1st character is effective) - Source:
Returns:
character class- Type
- CharacterClass
-
lookupCompatibleCategory(ch) → {Array.<CharacterClass>}
-
Lookup compatible categories for a character (not included 1st category)
Parameters:
Name Type Description ch
string UCS2 character (just 1st character is effective) - Source:
Returns:
character classes- Type
- Array.<CharacterClass>