trim

Return a substring of a specified source string, in which all leading and trailing white space has been removed.

Syntax

string trim(string str)

Parameters

str
The source string from which leading and trailing white spaces are removed to produce the return value.

Return Value

Returns a copy of the string str, without the leading and trailing white spaces.

Example

Test Lines

Result