String

String

is the head of a character string "text".

Details

  • Strings can contain any sequence of ordinary or special characters. »
  • _String can be used as a pattern that represents a string.
  • In FullForm, special characters in strings are given as or . »
  • If an explicit newline in the string is preceded by a single backslash \, the backslash and newline are ignored.

Examples

open allclose all

Basic Examples  (1)

Enter a string:

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

InputForm shows quotes:

In[2]:=
Click for copyable input
Out[2]//InputForm=

Scope  (6)

Generalizations & Extensions  (2)

Applications  (5)

Properties & Relations  (5)

Possible Issues  (5)

See Also

ToExpression  ToString  Characters  StringExpression  RegularExpression  StringQ  SyntaxQ  Import  Export

Tutorials

Introduced in 1988
(1.0)
| Updated in 1996
(3.0)