Options
All
  • Public
  • Public/Protected
  • All
Menu

Class StringUtil

Hierarchy

  • StringUtil

Index

Methods

Static getPadding

  • getPadding(padding: string | number): string
  • Get a string that represents padding to apply to another string.

    Parameters

    • padding: string | number

      A string or Number to convert to padding string. If padding is a string then it will be URI Decoded and returned.

      If pading was 'https%3A%2F%2Fsomeurl.com%2Fmy%20test.asp%3Fname%3Dst' it would be returned as 'https://someurl.com/my test.asp?name=ståle&car=saab'

    Returns string

Static isValidPadding

  • isValidPadding(padding: string | number): boolean
  • Get if a string or number that represents padding is valid padding value Empty string and 0 are considered to be valid padding values as well.

    Parameters

    • padding: string | number

      A string or Number to test for padding values

    Returns boolean

    true if padding is valid; Otherwise, false

Static padLeft

  • padLeft(value: string, padding: string | number): string
  • Pads the left side of a string.

    Parameters

    • value: string

      A string to pad left.

    • padding: string | number

      The padding to apply If padding is a string it will be used. If padding is a number that number will be converted to spaces equal to the number

    Returns string

Static Private stringDecode

  • stringDecode(s: string, e: eKindType): string
  • Decodes a string

    Parameters

    • s: string

      The string to decode

    • e: eKindType

      The kind of encodeing or decodeing, such as base64, base64uri, jsString, uri

    Returns string

Static stringDecodeEncode

  • Encodes or Decodes a string

    Parameters

    • s: string

      The string to encode or decode

    • e: eKindType

      The kind of encodeing or decodeing, such as base64, base64uri, jsString, uri

    • p: eProcessType

      Determins if the s is to be encoded or decoded

    Returns string

Static Private stringEncode

  • stringEncode(s: string, e: eKindType): string
  • Encodes a string

    Parameters

    • s: string

      The string to encode

    • e: eKindType

      The kind of encodeing or decodeing, such as base64, base64uri, jsString, uri

    Returns string

Generated using TypeDoc