Whitespace

Whitespace

represents a sequence of whitespace characters in StringExpression.

Details

  • Whitespace is taken to include spaces, tabs, and newlines.

Examples

Basic Examples  (2)

Split a string at all Whitespace characters:

In[1]:=
Click for copyable input
Out[1]=

Remove all leading and trailing spaces:

In[1]:=
Click for copyable input
Out[1]//FullForm=

See Also

WhitespaceCharacter  WordBoundary  NoWhitespace

Tutorials

Introduced in 2004
(5.1)