Options
All
  • Public
  • Public/Protected
  • All
Menu

Represents a symbol[1] value in an Ion stream.

[1] https://amazon-ion.github.io/ion-docs/docs/spec.html#symbol

Hierarchy

  • __type<StringConstructor, this> & String
    • Symbol

Index

Constructors

constructor

  • new Symbol(symbolText: string, annotations?: string[]): Symbol
  • Constructor.

    Parameters

    • symbolText: string

      The text to represent as a symbol.

    • annotations: string[] = []

      An optional array of strings to associate with this symbol.

    Returns Symbol

Properties

_ionAnnotations

_ionAnnotations: string[]

_ionType

_ionType: IonType

Readonly length

length: number

Returns the length of a String object.

Methods

[Symbol.iterator]

  • [Symbol.iterator](): IterableIterator<string>
  • Iterator

    Returns IterableIterator<string>

_setAnnotations

  • _setAnnotations(annotations: string[]): void
  • Parameters

    • annotations: string[]

    Returns void

_unsupportedOperation

  • _unsupportedOperation<T>(functionName: string): never
  • Type parameters

    Parameters

    • functionName: string

    Returns never

_valueEquals

  • _valueEquals(other: any, options?: { epsilon?: null | number; ignoreAnnotations?: boolean; ignoreTimestampPrecision?: boolean; onlyCompareIon?: boolean }): boolean
  • Parameters

    • other: any
    • options: { epsilon?: null | number; ignoreAnnotations?: boolean; ignoreTimestampPrecision?: boolean; onlyCompareIon?: boolean } = ...
      • Optional epsilon?: null | number
      • Optional ignoreAnnotations?: boolean
      • Optional ignoreTimestampPrecision?: boolean
      • Optional onlyCompareIon?: boolean

    Returns boolean

allFields

  • allFields(): [string, Value[]][]
  • Returns [string, Value[]][]

anchor

  • anchor(name: string): string

as

big

  • big(): string
  • Returns a HTML element

    Returns string

bigIntValue

  • bigIntValue(): null | bigint
  • Returns null | bigint

blink

  • blink(): string
  • Returns a HTML element

    Returns string

bold

  • bold(): string
  • Returns a HTML element

    Returns string

booleanValue

  • booleanValue(): null | boolean
  • Returns null | boolean

charAt

  • charAt(pos: number): string
  • Returns the character at the specified index.

    Parameters

    • pos: number

      The zero-based index of the desired character.

    Returns string

charCodeAt

  • charCodeAt(index: number): number
  • Returns the Unicode value of the character at the specified location.

    Parameters

    • index: number

      The zero-based index of the desired character. If there is no character at the specified index, NaN is returned.

    Returns number

codePointAt

  • codePointAt(pos: number): undefined | number
  • Returns a nonnegative integer Number less than 1114112 (0x110000) that is the code point value of the UTF-16 encoded code point starting at the string element at position pos in the String resulting from converting this object to a String. If there is no element at that position, the result is undefined. If a valid UTF-16 surrogate pair does not begin at pos, the result is the code unit at pos.

    Parameters

    • pos: number

    Returns undefined | number

compareValue

  • compareValue(expectedValue: string): number

concat

  • concat(...strings: string[]): string
  • Returns a string that contains the concatenation of two or more strings.

    Parameters

    • Rest ...strings: string[]

      The strings to append to the end of the string.

    Returns string

dateValue

  • dateValue(): null | Date
  • Returns null | Date

decimalValue

  • Returns null | Decimal

deleteField

  • deleteField(name: string): boolean
  • Parameters

    • name: string

    Returns boolean

elements

endsWith

  • endsWith(searchString: string, endPosition?: number): boolean
  • Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at endPosition – length(this). Otherwise returns false.

    Parameters

    • searchString: string
    • Optional endPosition: number

    Returns boolean

equals

  • equals(other: any, options?: { epsilon?: null | number }): boolean
  • Implementation of the dom.Value interface method equals()

    Parameters

    • other: any
    • options: { epsilon?: null | number } = ...
      • Optional epsilon?: null | number

    Returns boolean

fieldNames

  • fieldNames(): string[]
  • Returns string[]

fields

  • fields(): [string, Value][]
  • Returns [string, Value][]

fixed

  • fixed(): string
  • Returns a HTML element

    Returns string

fontcolor

  • fontcolor(color: string): string
  • Returns a HTML element and sets the color attribute value

    Parameters

    • color: string

    Returns string

fontsize

  • fontsize(size: number): string
  • fontsize(size: string): string
  • Returns a HTML element and sets the size attribute value

    Parameters

    • size: number

    Returns string

  • Returns a HTML element and sets the size attribute value

    Parameters

    • size: string

    Returns string

get

getAll

getAnnotations

  • getAnnotations(): string[]
  • Returns string[]

getType

includes

  • includes(searchString: string, position?: number): boolean
  • Returns true if searchString appears as a substring of the result of converting this object to a String, at one or more positions that are greater than or equal to position; otherwise, returns false.

    Parameters

    • searchString: string

      search string

    • Optional position: number

      If position is undefined, 0 is assumed, so as to search all of the String.

    Returns boolean

indexOf

  • indexOf(searchString: string, position?: number): number
  • Returns the position of the first occurrence of a substring.

    Parameters

    • searchString: string

      The substring to search for in the string

    • Optional position: number

      The index at which to begin searching the String object. If omitted, search starts at the beginning of the string.

    Returns number

ionEquals

  • ionEquals(other: Value, options?: { epsilon?: null | number; ignoreAnnotations?: boolean; ignoreTimestampPrecision?: boolean }): boolean
  • Implementation of the dom.Value interface method ionEquals()

    Parameters

    • other: Value
    • options: { epsilon?: null | number; ignoreAnnotations?: boolean; ignoreTimestampPrecision?: boolean } = ...
      • Optional epsilon?: null | number
      • Optional ignoreAnnotations?: boolean
      • Optional ignoreTimestampPrecision?: boolean

    Returns boolean

isNull

  • isNull(): boolean
  • Returns boolean

italics

  • italics(): string
  • Returns an HTML element

    Returns string

lastIndexOf

  • lastIndexOf(searchString: string, position?: number): number
  • Returns the last occurrence of a substring in the string.

    Parameters

    • searchString: string

      The substring to search for.

    • Optional position: number

      The index at which to begin searching. If omitted, the search begins at the end of the string.

    Returns number

link

  • link(url: string): string

localeCompare

  • localeCompare(that: string): number
  • localeCompare(that: string, locales?: string | string[], options?: CollatorOptions): number
  • Determines whether two strings are equivalent in the current locale.

    Parameters

    • that: string

      String to compare to target string

    Returns number

  • Determines whether two strings are equivalent in the current or specified locale.

    Parameters

    • that: string

      String to compare to target string

    • Optional locales: string | string[]

      A locale string or array of locale strings that contain one or more language or locale tags. If you include more than one locale string, list them in descending order of priority so that the first entry is the preferred locale. If you omit this parameter, the default locale of the JavaScript runtime is used. This parameter must conform to BCP 47 standards; see the Intl.Collator object for details.

    • Optional options: CollatorOptions

      An object that contains one or more properties that specify comparison options. see the Intl.Collator object for details.

    Returns number

match

  • match(regexp: string | RegExp): null | RegExpMatchArray
  • match(matcher: { [Symbol.match]: any }): null | RegExpMatchArray
  • Matches a string with a regular expression, and returns an array containing the results of that search.

    Parameters

    • regexp: string | RegExp

      A variable name or string literal containing the regular expression pattern and flags.

    Returns null | RegExpMatchArray

  • Matches a string or an object that supports being matched against, and returns an array containing the results of that search, or null if no matches are found.

    Parameters

    • matcher: { [Symbol.match]: any }

      An object that supports being matched against.

      • [Symbol.match]: function
        • [Symbol.match](string: string): null | RegExpMatchArray
        • Parameters

          • string: string

          Returns null | RegExpMatchArray

    Returns null | RegExpMatchArray

matchAll

  • matchAll(regexp: RegExp): IterableIterator<RegExpMatchArray>
  • Matches a string with a regular expression, and returns an iterable of matches containing the results of that search.

    Parameters

    • regexp: RegExp

      A variable name or string literal containing the regular expression pattern and flags.

    Returns IterableIterator<RegExpMatchArray>

normalize

  • normalize(form: "NFC" | "NFD" | "NFKC" | "NFKD"): string
  • normalize(form?: string): string
  • Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.

    Parameters

    • form: "NFC" | "NFD" | "NFKC" | "NFKD"

      Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default is "NFC"

    Returns string

  • Returns the String value result of normalizing the string into the normalization form named by form as specified in Unicode Standard Annex #15, Unicode Normalization Forms.

    Parameters

    • Optional form: string

      Applicable values: "NFC", "NFD", "NFKC", or "NFKD", If not specified default is "NFC"

    Returns string

numberValue

  • numberValue(): null | number
  • Returns null | number

padEnd

  • padEnd(maxLength: number, fillString?: string): string
  • Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the end (right) of the current string.

    Parameters

    • maxLength: number

      The length of the resulting string once the current string has been padded. If this parameter is smaller than the current string's length, the current string will be returned as it is.

    • Optional fillString: string

      The string to pad the current string with. If this string is too long, it will be truncated and the left-most part will be applied. The default value for this parameter is " " (U+0020).

    Returns string

padStart

  • padStart(maxLength: number, fillString?: string): string
  • Pads the current string with a given string (possibly repeated) so that the resulting string reaches a given length. The padding is applied from the start (left) of the current string.

    Parameters

    • maxLength: number

      The length of the resulting string once the current string has been padded. If this parameter is smaller than the current string's length, the current string will be returned as it is.

    • Optional fillString: string

      The string to pad the current string with. If this string is too long, it will be truncated and the left-most part will be applied. The default value for this parameter is " " (U+0020).

    Returns string

repeat

  • repeat(count: number): string
  • Returns a String value that is made from count copies appended together. If count is 0, the empty string is returned.

    Parameters

    • count: number

      number of copies to append

    Returns string

replace

  • replace(searchValue: string | RegExp, replaceValue: string): string
  • replace(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string
  • replace(searchValue: { [Symbol.replace]: any }, replaceValue: string): string
  • replace(searchValue: { [Symbol.replace]: any }, replacer: (substring: string, ...args: any[]) => string): string
  • Replaces text in a string, using a regular expression or search string.

    Parameters

    • searchValue: string | RegExp

      A string to search for.

    • replaceValue: string

      A string containing the text to replace for every successful match of searchValue in this string.

    Returns string

  • Replaces text in a string, using a regular expression or search string.

    Parameters

    • searchValue: string | RegExp

      A string to search for.

    • replacer: (substring: string, ...args: any[]) => string

      A function that returns the replacement text.

        • (substring: string, ...args: any[]): string
        • Parameters

          • substring: string
          • Rest ...args: any[]

          Returns string

    Returns string

  • Replaces text in a string, using an object that supports replacement within a string.

    Parameters

    • searchValue: { [Symbol.replace]: any }

      A object can search for and replace matches within a string.

      • [Symbol.replace]: function
        • [Symbol.replace](string: string, replaceValue: string): string
        • Parameters

          • string: string
          • replaceValue: string

          Returns string

    • replaceValue: string

      A string containing the text to replace for every successful match of searchValue in this string.

    Returns string

  • Replaces text in a string, using an object that supports replacement within a string.

    Parameters

    • searchValue: { [Symbol.replace]: any }

      A object can search for and replace matches within a string.

      • [Symbol.replace]: function
        • [Symbol.replace](string: string, replacer: (substring: string, ...args: any[]) => string): string
        • Parameters

          • string: string
          • replacer: (substring: string, ...args: any[]) => string
              • (substring: string, ...args: any[]): string
              • Parameters

                • substring: string
                • Rest ...args: any[]

                Returns string

          Returns string

    • replacer: (substring: string, ...args: any[]) => string

      A function that returns the replacement text.

        • (substring: string, ...args: any[]): string
        • Parameters

          • substring: string
          • Rest ...args: any[]

          Returns string

    Returns string

replaceAll

  • replaceAll(searchValue: string | RegExp, replaceValue: string): string
  • replaceAll(searchValue: string | RegExp, replacer: (substring: string, ...args: any[]) => string): string
  • Replace all instances of a substring in a string, using a regular expression or search string.

    Parameters

    • searchValue: string | RegExp

      A string to search for.

    • replaceValue: string

      A string containing the text to replace for every successful match of searchValue in this string.

    Returns string

  • Replace all instances of a substring in a string, using a regular expression or search string.

    Parameters

    • searchValue: string | RegExp

      A string to search for.

    • replacer: (substring: string, ...args: any[]) => string

      A function that returns the replacement text.

        • (substring: string, ...args: any[]): string
        • Parameters

          • substring: string
          • Rest ...args: any[]

          Returns string

    Returns string

search

  • search(regexp: string | RegExp): number
  • search(searcher: { [Symbol.search]: any }): number
  • Finds the first substring match in a regular expression search.

    Parameters

    • regexp: string | RegExp

      The regular expression pattern and applicable flags.

    Returns number

  • Finds the first substring match in a regular expression search.

    Parameters

    • searcher: { [Symbol.search]: any }

      An object which supports searching within a string.

      • [Symbol.search]: function
        • [Symbol.search](string: string): number
        • Parameters

          • string: string

          Returns number

    Returns number

slice

  • slice(start?: number, end?: number): string
  • Returns a section of a string.

    Parameters

    • Optional start: number

      The index to the beginning of the specified portion of stringObj.

    • Optional end: number

      The index to the end of the specified portion of stringObj. The substring includes the characters up to, but not including, the character indicated by end. If this value is not specified, the substring continues to the end of stringObj.

    Returns string

small

  • small(): string
  • Returns a HTML element

    Returns string

split

  • split(separator: string | RegExp, limit?: number): string[]
  • split(splitter: { [Symbol.split]: any }, limit?: number): string[]
  • Split a string into substrings using the specified separator and return them as an array.

    Parameters

    • separator: string | RegExp

      A string that identifies character or characters to use in separating the string. If omitted, a single-element array containing the entire string is returned.

    • Optional limit: number

      A value used to limit the number of elements returned in the array.

    Returns string[]

  • Split a string into substrings using the specified separator and return them as an array.

    Parameters

    • splitter: { [Symbol.split]: any }

      An object that can split a string.

      • [Symbol.split]: function
        • [Symbol.split](string: string, limit?: number): string[]
        • Parameters

          • string: string
          • Optional limit: number

          Returns string[]

    • Optional limit: number

      A value used to limit the number of elements returned in the array.

    Returns string[]

startsWith

  • startsWith(searchString: string, position?: number): boolean
  • Returns true if the sequence of elements of searchString converted to a String is the same as the corresponding elements of this object (converted to a String) starting at position. Otherwise returns false.

    Parameters

    • searchString: string
    • Optional position: number

    Returns boolean

strike

  • strike(): string
  • Returns a HTML element

    Returns string

stringValue

  • stringValue(): string
  • Returns string

sub

  • sub(): string
  • Returns a HTML element

    Returns string

substr

  • substr(from: number, length?: number): string
  • Gets a substring beginning at the specified location and having the specified length.

    Parameters

    • from: number

      The starting position of the desired substring. The index of the first character in the string is zero.

    • Optional length: number

      The number of characters to include in the returned substring.

    Returns string

substring

  • substring(start: number, end?: number): string
  • Returns the substring at the specified location within a String object.

    Parameters

    • start: number

      The zero-based index number indicating the beginning of the substring.

    • Optional end: number

      Zero-based index number indicating the end of the substring. The substring includes the characters up to, but not including, the character indicated by end. If end is omitted, the characters from start through the end of the original string are returned.

    Returns string

sup

  • sup(): string
  • Returns a HTML element

    Returns string

timestampValue

toLocaleLowerCase

  • toLocaleLowerCase(locales?: string | string[]): string
  • Converts all alphabetic characters to lowercase, taking into account the host environment's current locale.

    Parameters

    • Optional locales: string | string[]

    Returns string

toLocaleUpperCase

  • toLocaleUpperCase(locales?: string | string[]): string
  • Returns a string where all alphabetic characters have been converted to uppercase, taking into account the host environment's current locale.

    Parameters

    • Optional locales: string | string[]

    Returns string

toLowerCase

  • toLowerCase(): string
  • Converts all the alphabetic characters in a string to lowercase.

    Returns string

toString

  • toString(): string
  • Returns a string representation of an object.

    Returns string

toUpperCase

  • toUpperCase(): string
  • Converts all the alphabetic characters in a string to uppercase.

    Returns string

trim

  • trim(): string
  • Removes the leading and trailing white space and line terminator characters from a string.

    Returns string

trimEnd

  • trimEnd(): string
  • trimEnd(): string
  • Removes the trailing white space and line terminator characters from a string.

    Returns string

  • Returns a copy with trailing whitespace removed.

    Returns string

trimLeft

  • trimLeft(): string
  • trimLeft(): string
  • Removes the leading white space and line terminator characters from a string.

    Returns string

  • Removes whitespace from the left end of a string.

    Returns string

trimRight

  • trimRight(): string
  • trimRight(): string
  • Removes the trailing white space and line terminator characters from a string.

    Returns string

  • Removes whitespace from the right end of a string.

    Returns string

trimStart

  • trimStart(): string
  • trimStart(): string
  • Removes the leading white space and line terminator characters from a string.

    Returns string

  • Returns a copy with leading whitespace removed.

    Returns string

uInt8ArrayValue

  • uInt8ArrayValue(): null | Uint8Array
  • Returns null | Uint8Array

valueOf

  • valueOf(): Object
  • valueOf(): string
  • Returns the primitive value of the specified object.

    Returns Object

  • Returns the primitive value of the specified object.

    Returns string

writeTo

  • writeTo(writer: Writer): void
  • Parameters

    Returns void

Static _fromJsValue

  • _fromJsValue(jsValue: any, annotations: string[]): Value
  • Parameters

    • jsValue: any
    • annotations: string[]

    Returns Value

Static _getIonType

Static fromCharCode

  • fromCharCode(...codes: number[]): string
  • Parameters

    • Rest ...codes: number[]

    Returns string

Static fromCodePoint

  • fromCodePoint(...codePoints: number[]): string
  • Return the String value whose elements are, in order, the elements in the List elements. If length is 0, the empty string is returned.

    Parameters

    • Rest ...codePoints: number[]

    Returns string

Static raw

  • raw(template: TemplateStringsArray, ...substitutions: any[]): string
  • String.raw is intended for use as a tag function of a Tagged Template String. When called as such the first argument will be a well formed template call site object and the rest parameter will contain the substitution values.

    Parameters

    • template: TemplateStringsArray

      A well-formed template string call site representation.

    • Rest ...substitutions: any[]

      A set of substitution values.

    Returns string

Legend

  • Namespace
  • Variable
  • Function
  • Function with type parameter
  • Type alias
  • Type alias with type parameter
  • Class
  • Constructor
  • Method
  • Inherited property
  • Inherited method
  • Enumeration
  • Interface