Trimming refers to the manipulation of a text string to remove leading and/or trailing whitespace (and/or ASCII control characters), or (optionally) a specified character.
Questions tagged [trim]
2454 questions
0
votes
2 answers
Remove all characters after a delimiter in a string
I am building a web crawler application in golang.
After downloading the HTML of a page, I separate out the URLs.
I am presented with URLs that have "#s" in them, such as "en.wikipedia.org/wiki/Race_condition#Computing". I would like to get rid…
user11656113
0
votes
1 answer
TRIM data that is imported via IMPORTRANGE
I am importing data from another workbook, but some of the data have extra spaces at the start or end. I am looking for a way to TRIM the IMPORTRANGE data.

Ralph C
- 47
- 1
- 7
0
votes
1 answer
PostgreSQL Trigger to generically trim fields of a INSERT/UPDATE record
I'm trying to trim INSERT/UPDATE generic records on every table on the DB to remove any whitespace before and after each text value (i.e. change " value " in "value").
I took a look at Generic string trimming trigger for Postgresql, but this works…

Mewster
- 1,057
- 3
- 11
- 21
0
votes
0 answers
How to get original value of scale without trim two decimal point in canvas.toJSON() in fabric js?
I am working in one image editor in which there are some facility :
like set image as canvas background and add image object into canvas.
I am using fabric js version 1.7.22. and can't update right now.
Let me explain whole scenario :
First I set…

Mayur Kukadiya
- 2,461
- 1
- 25
- 58
0
votes
1 answer
How do you trim or move the last letter of one column to another in excel. I have attached code
Good evening guys, Im trying to figure out how to move the last letter in one column to a new column in excel. I tried watching youtube vids and followed the code but it doesnt work. For example A:1 cell says "Susie B." sometimes it doesnt have the…

Austin
- 1
- 3
0
votes
2 answers
SQL - How to remove a space character from a string
I have a table where the max length of a column (varchar) is 12, someone has loaded some value with a space, so rather than 'SPACE' it's 'SPACE '
I want to remove the space using a script, I was positive RTRIM or REPLACE(myValue, ' ', '') would work…

dwhybrow
- 39
- 1
- 5
0
votes
1 answer
Why does Excel 2007 pt-PT Trim all cells results in error?
I'm using excel 2007 - pt-PT and I'm trying to trim all cells (compactar) in my worksheet using a vba script.
The following script returns this error - "Object does not support this property or method" and I don't understand why.
Sub TrimAllCells()
…

Eunito
- 416
- 5
- 22
0
votes
2 answers
Is there a way to edit a substring in SQL?
For example lets say i have a select query:
SEL SUBSTRING(TXT,5,10) FROM RANDOM_DB.BDAYINFO
and this returns things like
01DEC99/M/
and also
01DEC9999/
there's data that comes back in both of these formats
What i'm trying to do is…

user3358064
- 7
- 2
- 7
0
votes
1 answer
white space is not removing from string in flutter
I have a question about trim function. when I am using trim it's not working. when I am adding white space and then used the trim function but still my validation is true. instead of trim has to remove all white space. Hope you understand the…

Rutvik Gumasana
- 1,458
- 11
- 42
- 66
0
votes
1 answer
How would you trim a string recursively without Java's trim() method?
The following method returns a trimmed string using iteration. How would you approach this recursively? Link to source
public static String allTrim(String str) {
int j = 0;
int count = 0; // Number of extra spaces
int…

osdalx
- 3
- 3
0
votes
3 answers
How to trim an unwanted continuous string at end in javascript?
I am trying to trim a string with unnecessary characters at the end as below.
I would appreciate either if someone corrects me or provide me an easy approach!!
Expected Result: finalString, Hello ---- TecAdmin
const longStr = "Hello ----…

sumanth
- 751
- 2
- 15
- 34
0
votes
2 answers
How to eliminate\remove last character and space after that and to merge splitted word in php after using OCR for scanning documents
How to eliminate\remove last character and space after that and to merge splitted word in php after using OCR for scanning documents
Tried with rtrim, replace etc..
But it also delete - on beginning of text
$delete =…

user3836412
- 11
- 1
- 5
0
votes
1 answer
ngModel doesn't reflect change when trimming one character from end of string
I am using ngModel in the template and when the variable length becomes 16 and if continue typing then it should trim last character but it is not doing so.
And when I trim 2 characters then it starts working.
My agenda is to limit text input up to…

Ashish S
- 638
- 6
- 14
0
votes
3 answers
How to Remove Empty Strings
I'm trying to find a way to trim or remove spaces in what appeared to be empty strings so that when I look for a min value I get a result with characters and not an empty string with spaces.
Originally I tried excluding empty fields ( !="" )…

ace123
- 35
- 1
- 7
0
votes
2 answers
PHP trim() can't remove whitespaces
I have a problem with trim() function in PHP. I have some text code with whitespaces. This code contain only spaces.
When I use trim in that way:
$text = trim($v);
var_dump($text);
I got:
string(2) " "
When I use urlencode to check what is…

Pavel K
- 15
- 5