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.

Reading string from input with space character?

I'm using Ubuntu and I'm also using Geany and CodeBlock as my IDE. What I'm trying to do is reading …

c string input scanf whitespace
How do I change Eclipse to use spaces instead of tabs?

By default Eclipse indents with a hard tab character. How do I change it to spaces?

eclipse formatting tabs whitespace
How to check if a char is equal to an empty space?

Here's what I've got: private static int countNumChars(String s) { for(char c : s.toCharArray()){ if (Equals(c," ")) } } But that …

java char whitespace
Whitespace Matching Regex - Java

The Java API for regular expressions states that \s will match whitespace. So the regex \\s\\s should match two …

java regex whitespace
Remove spaces from std::string in C++

What is the preferred way to remove spaces from a string in C++? I could loop through all the characters …

c++ string stl whitespace
How do you allow spaces to be entered using scanf?

Using the following code: char *name = malloc(sizeof(char) + 256); printf("What is your name? "); scanf("%s", name); printf("Hello %s. …

c string printf scanf whitespace
How do I trim leading/trailing whitespace in a standard way?

Is there a clean, preferably standard method of trimming leading and trailing whitespace from a string in C? I'd roll …

c string whitespace trim
How do I remove leading whitespace in Python?

I have a text string that starts with a number of spaces, varying between 2 & 4. What is the simplest way …

python string whitespace trim
How can I trim leading and trailing white space?

I am having some troubles with leading and trailing white space in a data.frame. For example, I like to …

r whitespace trim removing-whitespace r-faq
Show whitespace characters in Visual Studio Code

Is it possible to show whitespace characters, like the space character, in Visual Studio Code? There doesn't appear to be …

visual-studio-code whitespace vscode-settings non-printing-characters