MAIDR JavaScript API
    Preparing search index...

    Function clip

    • Makes a producer string safe to hand an agent: strips control, format and invisible characters, then shortens it to max characters, ending in an ellipsis.

      Parameters

      • s: string

        The string to clip

      • max: number = 256

        The longest result, ellipsis included

      Returns string

      The cleaned string