Function limitString

  • Helper to limit the string to a specific length. the rest is reduced by the limitChars

    Author

    M.Karkowski

    Export

    Returns

    {{ isLimited: boolean, original: string, limited: string, }}

    Parameters

    • str: string

      The string to work with

    • length: number

      The max length including the limitChars

    • Optional limitChars: string = "..."

      The chars which should be used to express limiting

    Returns {
        isLimited: boolean;
        limited: string;
        original: string;
    }

    • isLimited: boolean
    • limited: string
    • original: string

Generated using TypeDoc