Trims or extends an entity on both sides to the next limiting entities.