Questions tagged [whitespace]

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.

Whitespace, or white space, is often used to refer to any combination of spaces, tabs, and new lines which create blank (or white, originally referring to the background color behind it) space between text, either horizontally or vertically. White space is not represented by a visual character or symbol, but in most cases does occupy space on the page.

Whitespace Characters

The following characters are all defined as being whitespace.

  • U+0009 - Horizontal Tab
  • U+000A - Line Feed
  • U+000B - Vertical Tab
  • U+000C - Form Feed
  • U+000D - Carriage Return
  • U+0020 - Space
  • U+0085 - Next Line
  • U+00A0 - Non-Breaking Space
  • U+1680 - Ogham Space Mark
  • U+180E - Mongolian Vowel Separator
  • U+2000 - EN Quad
  • U+2001 - EM Quad
  • U+2002 - EN Space
  • U+2003 - EM Space
  • U+2004 - Three-per-EM Space
  • U+2005 - Four-per-EM Space
  • U+2006 - Six-per-EM Space
  • U+2007 - Figure Space
  • U+2008 - Punctuation Space
  • U+2009 - Thin Space
  • U+200A - Hair Space
  • U+2028 - Line Separator
  • U+2029 - Paragraph Separator
  • U+202F - Narrow Non-Breaking Space
  • U+205F - Medium Mathematical Space
  • U+3000 - Ideographic Space
4336 questions
2
votes
3 answers

HTML Get rid of white space collapsing

If you write this: a b it will normally render as "a b". I want it to render as "ab". Any thoughts?
JChlip
  • 121
  • 1
  • 2
  • 3
2
votes
1 answer

Return lines in input code causing gaps/whitespace between elements in output?

Possible Duplicate: Ignore whitespace in HTML I am trying to put images next to each other on a webpage. Here is my HTML: Yellow Tulip
2
votes
3 answers

Force fscanf to Consume Possible Whitespace

I have a multiline TSV file with the following format: Type\tBasic Name\tAttribute\tA Long Description\n As you can see, the Basic Name and the Description can both contain some number of spaces. I am trying to read each line in and extract the…
Tanaki
  • 2,575
  • 6
  • 30
  • 41
2
votes
3 answers

Delete white space on exact position in php

I was just wondering how I could exactly remove white space or even character by row and position inside row. I can't find info about this but I think that the PHP trim() could help. Also I was thinking about a solution for dynamic text. Where I…
botenvouwer
  • 4,334
  • 9
  • 46
  • 75
2
votes
1 answer

Store strings with spaces into Arrays Bash

I'm trying to store a string with spaces into an array. I've used IFS="" and noticed that by doing this. my array_size is 1 although I have multiple strings. Is there a way to fix this? the code i'm using size=0 declare -a new for t in ${temp}; do …
user1709294
  • 1,675
  • 5
  • 18
  • 21
2
votes
1 answer

How to do multiple string replacements in a cleaner manner? - Python

What is a fast way of doing multiple string.replace? I'm trying to add spaces to shorten english words like he'll -> he 'll he's -> he 's we're -> we 're we've -> we 've also i'm adding spaces in between before and punctuation as such: "his…
alvas
  • 115,346
  • 109
  • 446
  • 738
2
votes
2 answers

Removing whitespaces from encrypted data

I have a function for decrypt earlier decrypted data: public function Decrypt($encrypedText) { $key = "The secret key is"; $decryptedText = mcrypt_decrypt(MCRYPT_RIJNDAEL_256, $key, base64_decode($encrypedText), MCRYPT_MODE_ECB); …
holyredbeard
  • 19,619
  • 32
  • 105
  • 171
2
votes
1 answer

Ruby erb template is removing too much whitespace

I have the following line in my erb template: SetEnv <%= name %> <%= value %> The output from this line looks like this... SetEnv SomeNameSomeValue There is no whitespace between the name and value items. I want it to output this: SetEnv SomeName…
Rik Heywood
  • 13,816
  • 9
  • 61
  • 81
2
votes
1 answer

The meaning of special characters in whitespace-mode

In whitespace-mode (whitespace.el on EmacsWiki), there's a variable called whitespace-display-mappings. The variable determines how certain special characters should be rendered in different contexts. It can have various default values depending on…
dflemstr
  • 25,947
  • 5
  • 70
  • 105
2
votes
1 answer

Retaining whitespaces in textview in android

I am trying to format(add styling) to some text using html and setting that as a text for a textview Spanned text =Html.fromHtml(""+newAllText); hello.setText(text, TextView.BufferType.SPANNABLE); But the Html() method returns Spanned string with…
2
votes
4 answers

Why does this sed command not match whitespace?

This bash script is supposed to remove leading whitespace from grep results: #!/bin/bash grep --color=always $@ | sed -r -e's/:[[:space:]]*/:/' But it doesn't match the whitespace. If I change the substitution text to "-", that shows up in the…
Byron Hawkins
  • 2,536
  • 2
  • 24
  • 34
2
votes
1 answer

Strip unnecessary whitespace - "unnecessary" being key

In an effort to reduce bandwidth, I am trying to strip out unnecessary whitespace. By "unnecessary", I am referring to any vertical whitespace, and horizontal whitespace at the start or end of lines, but not if it is in a