Refactored string text wrapping