Intersection and set difference operations are common in mathematics classes on set theory. Similar operations on strings are useful in some scenarios.