Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "src/util/string"

Index

Variables

Const allUppercase

allUppercase: RegExp = /^[A-Z-]+$/

Functions

compressSpaces

  • compressSpaces(str: string): string
  • HTML-safe compress white-spaces.

    Parameters

    • str: string

      String to compress.

    Returns string

normalizeAttributeName

  • normalizeAttributeName(name: string): string
  • Normalize attribute name.

    Parameters

    • name: string

      Attribute name.

    Returns string

normalizeColor

  • normalizeColor(color: string): string
  • Transform floats to integers in rgb colors.

    Parameters

    • color: string

      Color to normalize.

    Returns string

parseExternalUrl

  • parseExternalUrl(url: string): string
  • Parse external URL.

    Parameters

    • url: string

      CSS url string.

    Returns string

toNumbers

  • toNumbers(str: string): number[]
  • String to numbers array.

    Parameters

    • str: string

      Numbers string.

    Returns number[]

trimLeft

  • trimLeft(str: string): string
  • HTML-safe left trim.

    Parameters

    • str: string

      String to trim.

    Returns string

trimRight

  • trimRight(str: string): string
  • HTML-safe right trim.

    Parameters

    • str: string

      String to trim.

    Returns string

Generated using TypeDoc