Library API
    Preparing search index...

    Function trimAll

    • Cleans a string by removing standard control characters (tab, line-feed, carriage-return) and trimming redundant spaces. Allows for an optional RegExp to specify additional matches to remove.

      Parameters

      • str: string | number

        The string to clean

      • Optionalpat: RegExp

        Optional RegExp pattern to remove from the string

      Returns string

      The cleaned string

      trimAll('  hello \t world \n'); // 'hello world'