Characters

Characters["string"]

gives a list of the characters in a string.

Details

  • Each character is given as a length one string.
  • Characters handles both ordinary and special characters.
  • Characters has attribute Listable.

Examples

open allclose all

Basic Examples  (1)

Break a string into a list of characters:

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

Show in InputForm:

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

Reassemble the string:

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

Scope  (2)

Applications  (4)

Properties & Relations  (1)

Possible Issues  (3)

See Also

String  StringJoin  StringLength  ToCharacterCode  StringExpression  StringToStream  CharacterRange  Transliterate

Tutorials

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