Function rebuildWords

    • Inverse of parseWords. Interleaves words with seps; added words get " " gaps, removed words keep the original trailing separator. A zero-word original (seps.length === 1) treats its one entry as lead only, so words append after it without double-counting as trail.

      Parameters

      • words: string[]
      • seps: string[]

      Returns string