Questions tagged [space]

DO NOT USE THIS TAG! It is too ambiguous; instead please use a more specific tag like letter-spacing (separation between letters), whitespace (between words), margin (areas of a screen), layout or a platform/language-specific tag (for non-web layouts), etc.

DO NOT USE THIS TAG! It is too ambiguous; please tag your platform and/or language instead and if necessary a more specific tag like

  • letter-spacing (separation between letters),
  • whitespace (between words, glyphs),
  • margin (areas of a screen),
  • layout or a platform-specific tag (for non-web layouts)

etc.

Space characters in text systems indicate separation between words or glyphs. While most Western scripts use only one space character, Unicode defines multiple different kinds of whitespace characters for use in specialized typography functions and in Asian languages.

1977 questions
227
votes
10 answers

How can I convert leading spaces to tabs in Vim or Linux?

I've looked over several questions on Stack Overflow for how to convert spaces to tabs without finding what I need. There seem to be more questions about how to convert tabs to spaces, but I'm trying to do the opposite. In Vim I've tried :retab and…
cwd
  • 53,018
  • 53
  • 161
  • 198
216
votes
19 answers

How to insert spaces/tabs in text using HTML/CSS

Possible ways:
 ... 
or style="white-space:pre" Anything else?
Yeseanul
  • 2,787
  • 4
  • 21
  • 25
215
votes
8 answers

std::cin input with spaces?

#include std::string input; std::cin >> input; The user wants to enter "Hello World". But cin fails at the space between the two words. How can I make cin take in the whole of Hello World? I'm actually doing this with structs and…
dukevin
  • 22,384
  • 36
  • 82
  • 111
146
votes
4 answers

How can I add white space before an element's content using CSS?

None of the following code works: p:before { content: " "; } p:before { content: " "; } How do I add white space before an element's content? Note: I need to color the border-left and the margin-left for semantic use and use the space as a…
Hugolpz
  • 17,296
  • 26
  • 100
  • 187
138
votes
10 answers

Set a path variable with spaces in the path in a Windows .cmd file or batch file

I'm new to script writing and can't get this one to work. I could if I moved the files to a path without a space in it, but I'd like it to work with the space if it could. I want to extract a bunch of Office updates to a folder with a .cmd file. …
marcerickson
  • 1,481
  • 2
  • 10
  • 4
92
votes
1 answer

Using tr to replace newline with space

Have output from sed: http://sitename.com/galleries/83450 72-profile Those two strings should be merged into one and separated with space like: http://sitename.com/galleries/83450 72-profile Two strings are pipelined to tr in order to replace…
y.bregey
  • 1,469
  • 1
  • 12
  • 21
83
votes
3 answers

Reading text file with multiple space as delimiter in R

I have big data set which consist of around 94 columns and 3 Million rows. This file have single as well as multiple spaces as delimiter between columns. I need to read some columns from this file in R. For this I tried using read.table() with…
Pawan
  • 1,066
  • 1
  • 10
  • 16
81
votes
3 answers

Adding space between numbers

I'm trying to make a number input. I've made so my textbox only accepts numbers via this code: function isNumber(evt) { evt = (evt) ? evt : window.event; var charCode = (evt.which) ? evt.which : evt.keyCode; if (charCode > 31 &&…
user1768788
  • 1,265
  • 1
  • 10
  • 29
68
votes
14 answers

How can I find whitespace in a String?

How can I check to see if a String contains a whitespace character, an empty space or " ". If possible, please provide a Java example. For example: String = "test word";
jimmy
  • 8,121
  • 11
  • 36
  • 40
68
votes
3 answers

Handling of non breaking space:

 

vs.

  is a non breaking space, which represents an empty space where no line break occurs. If I use

 

I have a space between two passages (bigger break). If I use

I only have a new line between the two passage (no break).…
grabner
  • 1,219
  • 3
  • 13
  • 23
65
votes
13 answers

what's the easiest way to put space between 2 side-by-side buttons in asp.net

I have 2 buttons side by side, and I would like to have some inbetween them. Following code will have 2 buttons right next to each other. I have tried margin for the div, and just couldn't get some nice space between the two.
user570185
  • 653
  • 1
  • 6
  • 9
65
votes
7 answers

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 a string with multiple spaces on it in JavaScript?
István
  • 5,057
  • 10
  • 38
  • 67
64
votes
18 answers

Converting a sentence string to a string array of words in Java

I need my Java program to take a string like: "This is a sample sentence." and turn it into a string array like: {"this","is","a","sample","sentence"} No periods, or punctuation (preferably). By the way, the string input is always one sentence. Is…
AnimatedRNG
  • 1,859
  • 3
  • 26
  • 39
56
votes
10 answers

Removing body margin in CSS

I'm new to web development, and met a problem when removing margin of body. There's space between the very top of the browser and "logo" text. And my code is here on jsbin. Is body { margin: 0;} wrong if I'd like to remove the space?
chenghuayang
  • 1,424
  • 1
  • 17
  • 35
50
votes
7 answers

What is the symbol for whitespace in C?

I am trying to figure out how to check if a character is equal to white-space in C. I know that tabs are '\t' and newlines are '\n', but I want to be able to check for just a regular normal space (from the space-bar) inside of an if statement. Does…
Cesar A
  • 663
  • 1
  • 7
  • 10
1
2 3
99 100