Text UtilitiesLesson 119Free preview
Whitespace Cleaner
This lesson is part of Web Developer Tools · All levels
Summary
Whitespace cleaner removes excess spaces, tabs, and new lines to make text easier to read. Usually, this tool cuts the spaces at the beginning and end and combines the double spaces into one. Some tools also offer a mode of removing entire whitespace. Choose the mode carefully because the indentation on the code can have a special meaning.
Key points
- Whitespace includes spaces, tabs, carriage, and newlines
- Trim is wasting space on both ends of the text
- Spatial collapses replace several consecutive spaces with one
- Delete all useful spaces only for specific needs
- Check the code indentation before cleaning out the whitespace
Full lesson
Code examples and quizzes
Full lessons, code examples, and quizzes are available to subscribers. 5 questions.