Overview
Introduction
Removing every item that appears in one list from another, like clearing a completed-tasks list out of a master to-do list, is a common one-directional cleanup operation.
List Subtractor handles this directly: give it List A and List B, and it returns List A with every item found in List B removed.
What Is List Subtractor?
A one-directional set-subtraction tool: it checks every item in List A for membership in List B and keeps only the items that aren't found there.
Unlike List Comparer or Distinct List Item Finder, it's asymmetric by design, List B's own content beyond membership checking never appears in the output.
How List Subtractor Works
Both inputs are split into items using the shared selected separator; List B's items are collected into a set for fast membership checks.
List A's items are filtered, keeping only items not present in List B's set, preserving List A's original order and any surviving duplicate occurrences.
When To Use List Subtractor
Use it to remove a "do not include" list of items from a master list, like excluding completed tasks or blocked usernames.
It's the right tool whenever the operation is naturally directional, unlike a symmetric two-way comparison.
Often used alongside List Comparer, Common List Item Finder and Distinct List Item Finder.
Features
Advantages
- Directional by design, matching the common real-world "remove these from that" workflow exactly.
- Preserves List A's original order and multiplicity for whatever survives.
Limitations
- Doesn't report what was removed; use List Comparer first if you want visibility into the overlap before subtracting.
- Comparison is exact and case-sensitive with no trimming applied.
Examples
Best Practices & Notes
Best Practices
- Run List Comparer first if you want to see the overlap before deciding to subtract it.
- Use Common List Item Finder instead if you actually want the overlap itself, not List A minus the overlap.
Developer Notes
Builds a `Set<string>` from List B's items for O(1) average membership checks, then filters List A's raw items array (duplicates included) with `!setB.has(item)`, preserving List A's exact original order and multiplicity for survivors.
List Subtractor Use Cases
- Removing already-completed items from a master to-do or checklist
- Excluding a blocklist of values from a larger dataset
- Computing what's left in one export after removing everything present in another
Common Mistakes
- Expecting a symmetric result like List Comparer's; this tool is intentionally one-directional (A minus B only).
- Assuming List B's duplicate counts matter; only membership in List B is checked, not how many times a value appears there.
Tips
- If you need the reverse operation (B minus A), simply swap which list you paste into List A and List B.
- Chain the result into Repeating List Item Remover if you also want the surviving items de-duplicated.