Options
All
  • Public
  • Public/Protected
  • All
Menu

Module util/string

Index

Functions

compressSpaces

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

    Parameters

    • str: string

      String to compress.

    Returns string

    String.

normalizeAttributeName

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

    Parameters

    • name: string

      Attribute name.

    Returns string

    Normalized attribute name.

normalizeColor

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

    Parameters

    • color: string

      Color to normalize.

    Returns string

    Normalized color.

parseExternalUrl

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

    Parameters

    • url: string

      CSS url string.

    Returns string

    Parsed URL.

toNumbers

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

    Parameters

    • str: string

      Numbers string.

    Returns number[]

    Numbers array.

trimLeft

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

    Parameters

    • str: string

      String to trim.

    Returns string

    String.

trimRight

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

    Parameters

    • str: string

      String to trim.

    Returns string

    String.

Generated using TypeDoc