Top "Whitespace" questions

Whitespace, or white space, is often used to refer to any combination of spaces, tabs, and new lines which create blank space between text, either horizontally or vertically.

Render a string in HTML and preserve spaces and linebreaks

I have an MVC3 app that has a details page. As part of that I have a description (retrieved from …

html css newline whitespace line-breaks
XML Carriage return encoding

I was looking to represent a carriage return within an xml node. I have tried a whitespace preserve, hex entity …

xml encoding whitespace
How to remove trailing and leading whitespace for user-provided input in a batch file?

I know how to do this when the variable is pre-defined. However, when asking for the user to enter in …

input batch-file whitespace trim
How to create string with multiple spaces in JavaScript

By creating a variable var a = 'something' + ' ' + 'something' I get this value: 'something something'. How can I create …

javascript html whitespace space html-entities
Make git automatically remove trailing whitespace before committing

I'm using git with my team and would like to remove whitespace changes from my diffs, logs, merges, etc. I'm …

git whitespace githooks
How can I escape white space in a bash loop list?

I have a bash shell script that loops through all child directories (but not files) of a certain directory. The …

bash loops whitespace
Remove "whitespace" between div element

This is my HTML code <div id="div1"> <div></div><div></…

css html whitespace margin
How can strip whitespaces in PHP's variable?

I know this comment PHP.net. I would like to have a similar tool like tr for PHP such that …

php string whitespace
Replace whitespaces with tabs in linux

How do I replace whitespaces with tabs in linux in a given text file?

linux tabs whitespace
Trim whitespace from a String

I know there are several ways to do this in Java and C that are nice, but in C++ I …

c++ string whitespace trim