Options
All
  • Public
  • Public/Protected
  • All
Menu

Static utility methods for strings and common operations involving strings.

Hierarchy

  • StringUtilities

Index

Methods

Static endsWith

  • endsWith(str: string, suffix: string): boolean
  • Determines if one string ends with another string.

    Parameters

    • str: string

      The string to check a suffix against.

    • suffix: string

      The string suffix to check.

    Returns boolean

Static getDateFromRestDateString

  • getDateFromRestDateString(restDateString: string): Date
  • Rest configuration object date strings are converted to the form "/Date()/" - even when the rest endpoint returns an ISO formatted date. This will parse the string and convert it to a date object.

    Parameters

    • restDateString: string

      The date string formatted as "/Date()/"

    Returns Date

    A Date object created by parsing the given string or null on error.

Static replaceLayerTokens

  • Replaces a specific set of Layer tokens with layer values, given a token and the Layer.

    Parameters

    • match: string

      The string that represents the token to replace.

    • layer: LayerStringProperties

      The Layer to use when substituting a value.

    Returns string

Static replaceMapServicetokens

  • Replaces a specific set of MapService tokens with map service values, given a token and the MapService.

    Parameters

    Returns string