Trimming (computer programming): Difference between revisions

Content deleted Content added
Yobot (talk | contribs)
m WP:CHECKWIKI errors fixed + general fixes using AWB (8961)
Line 30:
The characters which are considered whitespace varies between programming languages and implementations. For example, C traditionally only counts space, tab, line feed, and carriage return characters, while languages which support [[Unicode]] typically include all Unicode space characters. Some implementations also include [[ASCII]] control codes (non-printing characters) along with whitespace characters.
 
Java's trim method considers ASCII spaces and control codes as whitespace, contrasting with the Java <code>isWhitespace()</code> method,<ref>http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html#isWhitespace(char)</ref>, which recognizes all Unicode space characters.
 
Delphi's Trim function considers characters U+0000 (NULL) through U+0020 (SPACE) to be whitespace.
Line 174:
</source>
 
The [[open-source software|open source]] C++ library [[Boost library|Boost]] has several trim variants, including a standard one:<ref>http://www.boost.org/doc/html/string_algo/usage.html#id2742817</ref>:
 
<source lang="cpp">