UNPKG

devexpress-richedit

Version:

DevExpress Rich Text Editor is an advanced word-processing tool designed for working with rich text documents.

22 lines (21 loc) 877 B
import { StringUtils } from '@devexpress/utils/lib/utils/string'; import { DestinationType } from '../utils/destination-type'; import { StringValueDestinationBase } from './string-value-destination-base'; export class UnicodeStringValueDestination extends StringValueDestinationBase { get destinationType() { return DestinationType.UnicodeStringValueDestination; } _value = []; static emptyChar = '\0'; static lowbar = '_'; get value() { return StringUtils.trimEnd(this._value.join(""), [';']); } processCharCore(ch) { if (ch != UnicodeStringValueDestination.emptyChar) this._value.push(ch); else this._value.push(UnicodeStringValueDestination.lowbar); } createClone() { const clone = this.createEmptyClone(); clone._value = this._value; return clone; } }