Chop

Chop -- Remove trailing whitespace.

Description

string chop(string str);

Returns the argument string without trailing whitespace, including newlines.

Example 1. Chop() example

  1 
  2 $trimmed = chop ($line);
  3       

See also trim().