The following warnings occurred:
Warning [2] count(): Parameter must be an array or an object that implements Countable - Line: 807 - File: showthread.php PHP 7.3.15 (Linux)
File Line Function
/showthread.php 807 errorHandler->error





Post Reply 
 
Thread Rating:
  • 1 Vote(s) - 5 Average
  • 1
  • 2
  • 3
  • 4
  • 5
Trim whitespaces from a string?
2016-03-05, 01:42
Post: #1
Trim whitespaces from a string?
For some reason, Acer did store the manufacturer and product in my Acer Aspire One as:

Code:
"Acer      "
"Aspire one      "

And when outputting this to the screen, the added spaces look weird:

Code:
"Acer      Aspire one      boot menu"

I found several settings types which convert the data, e.g. uristring, hex, etc. ... but I didn't find a way to just trim the excessive spaces.

I found this discussion on the mailing list, but the mentioned trick doesn't work anymore and there's no other solution to the problem in that thread. There was also a proposal for a new "trim" command, but that's where the thread ended.

Is there a way to trim whitespaces?
Find all posts by this user
Quote this message in a reply
Post Reply 


Messages In This Thread
Trim whitespaces from a string? - mbirth - 2016-03-05 01:42



User(s) browsing this thread: 1 Guest(s)