From Friday, April 19th (11:00 PM CDT) through Saturday, April 20th (2:00 PM CDT), 2024, ni.com will undergo system upgrades that may result in temporary service interruption.

We appreciate your patience as we improve our online experience.

LabWindows/CVI Idea Exchange

cancel
Showing results for 
Search instead for 
Did you mean: 
0 Kudos
JonRice

Trim White Space

Status: New

Other text editors such as UltraEdit have the capability to trim white space from the end of lines.  This would be a useful feature, as sometimes extra white space can end up at the end of lines, and is annoying when copy/pasting, etc.  I would expect to find it under Options->Editor Preferences, similar to the tab/space settings.

2 Comments
PikesPeakNIUser
Member

Check out RemoveSurroundingWhiteSpace(...). It won't help when copying or pasting, but is useful when reading in text files.

JonRice
Member

That function is only useful when reading in a text file by a program.  I am talking about wanting to trim white space in the C file itself, not a secondary file used by the program.  Copying/Pasting code snippets between files/functions invariably ends up with extra whitespace at the ends of lines in the C file.  When wanting to further edit/comment the line, pressing the 'end' key goes to the end of the whitespace, which is annoying.