Utilities for line manipulation.