Trimming (computer programming): Difference between revisions

Content deleted Content added
m added " ''string''.lstrip or ''string''.rstrip " to Ruby entry in table
Removed clean-up tag
Line 1:
{{Manual|date=February 2009}}
{{bare URLsRefimprove|date=JuneFebruary 20132015}}
 
In [[computer programming]], '''trimming''' ('''trim''') or '''stripping''' ('''strip''') is a [[string manipulation]] in which leading and trailing [[whitespace (computer science)|whitespace]] is removed from a [[string (computer science)|string]].
Line 183:
Note that with boost's function named simply <code>trim</code> the input sequence is modified in-place,<ref>[http://www.boost.org/doc/html/trim.html ]{{dead link|date=August 2013}}</ref> and does not return a result.
 
Another [[open-source software|open source]] C++ library [[Qt (toolkit)|Qt]] has several trim variants, including a standard one:<ref>[http://doc.trolltech.com/4.5/qstring.html#trimmed] {{dead link|date=February 2015}}</ref>
 
<source lang="cpp-qt">
Line 286:
*[http://blog.stevenlevithan.com/archives/faster-trim-javascript Faster JavaScript Trim] - compares various JavaScript trim implementations
*[http://webwidetutor.com/php/substring/ php string cut and trimming]- php string cut and trimming
 
[[Category:Articles with example code]]
[[Category:Programming language comparisons]]