Questions tagged [removing-whitespace]

For issues related to removing additional blank-characters like spaces, tabs and new lines or issues related to removing unwanted whitespace.

Related tags:

756 questions
10
votes
1 answer

Git add -patch... but ignore whitespace changes

I can't seem to find a good way to use git add -p but tell git to ignore all whitespace changes. I don't want to reset my local changes. The situation: I had all my changes locally, and was grouping them into separate commits. Then I experimented…
Jillian Hoenig
  • 137
  • 1
  • 6
  • 28
10
votes
2 answers

How to auto-remove trailing whitespaces on save in Matlab?

I don't find an essential feature in Matlab 2012b: Remove trailing whitespaces on save. Related: How to auto-remove trailing whitespace in Eclipse? Aptana 3 - How remove trailing whitespaces on save
Wok
  • 4,956
  • 7
  • 42
  • 64
9
votes
3 answers

how to remove space in the middle using c#

how to remove space in the middle using c#? I have the string name="My Test String" and I need the output of the string as "MyTestString" using c#. Please help me.
Kalaivani
  • 477
  • 3
  • 9
  • 17
9
votes
3 answers

Can't access dataframe columns

I'm importing a dataframe from a csv file, but cannot access some of it's columns by name. What's going on? In more concrete terms: > import pandas > jobNames = pandas.read_csv("job_names.csv") > print(jobNames) job_id job_name …
drevicko
  • 14,382
  • 15
  • 75
  • 97
9
votes
4 answers

emacs delete-trailing-whitespace except current line

I recently added Emacs (delete-trailing-whitespace) function to my 'before-save-hook for some programming modes, but I find it rather frustrating that it deletes whitespace from the line I am currently editing. Any suggestions as to how to fix this…
pariser
  • 275
  • 3
  • 10
9
votes
2 answers

newline and dash not working correctly in jinja

How could I generate the expected output ? Thanks jinja template {%- for field in fields -%} - name: {{field}} type: string {%- endfor -%} output - name: operating revenue type: string- name: gross operating profit type:…
newBike
  • 14,385
  • 29
  • 109
  • 192
9
votes
2 answers

R fread and strip white

I have a csv file with extra white spaces that I want to read into R as a dataframe, stripping the white spaces. This can be achieved by using testdata<-read.csv("file.csv", strip.white=TRUE) The problem is that the dataset large and takes about…
DaReal
  • 597
  • 3
  • 10
  • 24
9
votes
5 answers

Remove all whitespaces from String but keep ONE newline

I have this input String (containg tabs, spaces, linebreaks): That is a test. seems to work pretty good? working. Another test again. [Edit]: I should have provided the String for better testing…
friesoft
  • 155
  • 2
  • 2
  • 7
8
votes
2 answers

How to clean a codebase, trailing whitespace, new lines etc

I have a code base that is driving me nuts with conflicts due to trailing whitespace. I'd like to clean it up. I'd want to: Remove all trailing whitespace Remove any newline characters at the end of files Convert all line endings to unix…
jhogendorn
  • 5,931
  • 3
  • 26
  • 35
8
votes
2 answers

Php Storm with "Strip trailing spaces on Save" set to "All" ignores line with cursor

Having 2 lines with trailing spaces and cursor at the end of the 2nd one, on save action only trailing spaces from 1st line will be striped. I mean, if I have this: 1st_line[space] 2nd_line[space][cursor] after save action I will…
kuba
  • 3,670
  • 3
  • 31
  • 41
8
votes
2 answers

Why is there a pesky little space between and other elements?

If a
or any other element follows an , then a ~3px whitespace appears in between them — even if margins are zero'd.
What is with that gap?
Here's what it looks like with some CSS. Now it's…
Baumr
  • 6,124
  • 14
  • 37
  • 63
7
votes
4 answers

How to remove whitespace from a string in Cypress

I'm trying to remove a whitespace from a numerical value representing money. For example, I want 1 000 kr to be 1000. This is the same case for when the currency is 10 000 I'm using this function to remove the kr but when I try to add another…
qatester123
  • 143
  • 1
  • 3
  • 9
7
votes
3 answers

remove null character from string

I want to check if string is empty and parse the string in time. Please find the below code valueStr = strings.Replace(string(valueStr), " ", "", -1) valueStr = strings.Replace(string(valueStr), "\t", "", -1) valueStr =…
Bhavana
  • 1,014
  • 4
  • 17
  • 26
7
votes
3 answers

Is it possible to remove white spaces from the CSV files header name in NiFi?

I have a CSV file in which some column name have white spaces in it and some column names are without the white space between characters. I want to remove the white spaces from all the header names that has white space in it. Please help. Thank…
Shrads
  • 883
  • 19
  • 39
7
votes
6 answers

How to remove   from the end of spans with a given class?

I need to remove the   after the value of given spans. The HTML looks like this: 0.15  The   is coming from the server (CMS). Is there any way to remove the   by using CSS rules?
ezhil
  • 977
  • 6
  • 15
  • 36