Avoids allocating strings for the non-wrapped line case, has bounded memory usage compared to prior implementation.