Constructors

Methods

Constructors

Methods

  • Returns an array with parts of the given text. These parts are of type LabelPart which can be either a string or a LabelIcon. For splitting up the giving text the parser follows this rule: The text gets parsed for the following pattern: $(iconName~iconAnimation). If the parser finds such pattern a new LabelIcon object { name: 'iconName', animation: 'iconAnimation'} is added to the returned array. iconName can be for instance the name of an icon of e.g. FontAwesome and the (optional) iconAnimation the name of an animation class which must be supported by the particular icon toolkit.

    Every string before, between or after such icon patterns gets also added to the array before, between or after the related LabelIcon.

    Parameters

    • text: string

      the label text to parse

    Returns LabelPart[]

  • Strips icon specifiers from the given text, leaving only a space-separated concatenation of the non-icon segments.

    Parameters

    • text: string

      text to be stripped of icon specifiers

    Returns string

    the text with icon specifiers stripped out