trim()

Description

Get a version of the String with any leading and trailing whitespace removed.

trim() modifies the string in place rather than returning a new one.

Syntax


string.trim()

Parameters

string : a variable of type String

Returns

none

Example

StringLengthTrim

See also

String


Language Reference Home

The text of the 86Duino reference is a modification of the Arduino reference, and is licensed under a Creative Commons Attribution-ShareAlike 3.0 License. Code samples in the reference are released into the public domain.