Search processing.org:

Reference for Processing (BETA) version 0135+. If you have a previous version, use the reference included with your software. If you see any errors or have any comments, let us know.

Name | ### trim()
Examples |
    String s = "  Somerville MA ";
    println(s);  // Prints "  Somerville MA "
    String s2 = trim(s);
    println(s2); // Prints "Somerville MA"

    String[] a = { " inconsistent ", " spacing" };
    String[] a2 = trim(a);
    println(a2);
Description | Removes whitespace characters from the beginning and end of a String. In addition to standard whitespace characters such as space, carriage return, and tab, this function also removes the Unicode "nbsp" character.
Syntax |
    trim(str)
    trim(array)
Parameters |
str | any String
array | a String array
Usage | Web & Application
Related | split() join()

Updated on February 04, 2007 10:21:03am PST