• Transforms a string into an array by splitting it at each || separator. Any |0 sequences in the string are unescaped to |.

    This function is the inverse of doCharStuffing.

    • It takes a string where elements are separated by || and transforms it back into an array.
    • If an element contains the sequence |0, it is unescaped to |.

    Parameters

    • input: string

      The string to transform into an array.

    Returns string[]

    The string transformed into an array.

    Example

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

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