Options
All
  • Public
  • Public/Protected
  • All
Menu

Module "wordpress-plugins/real-cookie-banner/src/public/ts/utils/truncateMiddle"

Index

Functions

Functions

truncateMiddle

  • truncateMiddle(str: string, maxLength?: number, separator?: string): string
  • Truncate a string with separator in the middle of the string.

    see

    https://stackoverflow.com/a/5723274/5506547

    Parameters

    • str: string
    • Default value maxLength: number = 50
    • Default value separator: string = "..."

    Returns string

Generated using TypeDoc