• Converts an array into a string using a specific separator and escape sequence.

    • This function transforms an array into a string, where each element is separated by ||.
    • If an element contains the | character, it is escaped with |0.
    • Elements that are undefined or the string "undefined" are skipped.

    Parameters

    • list: any[]

      The array to transform into a string.

    Returns string

    The array transformed into a string.

    Example

    // Convert an array of numbers into a string
    const numberArray = [1, 2, 3];
    const numberString = ix.api.text.doCharStuffing(numberArray);
    console.log(numberString); // Outputs: "1||2||3"

    // Convert an array of strings into a string, with character stuffing
    const stringArray = ["abc", "d|e", "fgh"];
    const stringString = ix.api.text.doCharStuffing(stringArray);
    console.log(stringString); // Outputs: "abc||d|0e||fgh"