ECName Class

The name of an item in a Schema, encoded to meet restrictions on the characters usable in such names. An ECName meets the following criteria:

  • Contains at least one character.
  • Does not begin with a digit.
  • Consists entirely of characters in the ASCII ranges A-Z, a-z, and 0-9; and the underscore ("_") character.

All characters not meeting the above criteria are encoded as "x####" where "####" is the UTF-16 character code. Such names are often automatically generated from the item's display label, which is unrestricted in the characters it may contain.

Methods

Name Description
constructor(name: string): ECName Construct a new ECName from a valid EC name.  
decode(): string Decode this ECName, replacing encoded special characters with the characters they encode.  
encode(input: string): ECName Static Create an ECName from an arbitrary string, encoding any special characters as "x####" where "####" is the UTF-16 character code.  
validate(name: string): boolean Static Returns true if a string meets the criteria of a valid EC name.  

Properties

Name Type Description
name Accessor ReadOnly string The underlying name as a string.  

Defined in

Last Updated: 11 June, 2024