Trimming (computer programming): Difference between revisions

Content deleted Content added
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, whilecontrasting with the Java's <code>isWhitespace()</code> method<ref>http://java.sun.com/j2se/1.5.0/docs/api/java/lang/Character.html#isWhitespace(char) isWhitespace()</ref>, methodwhich recognizes all Unicode space characters.
 
Delphi's Trim function considers characters U+0000 (NULL) through U+0020 (SPACE) to be whitespace.