This is documentation for Mathematica 8, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.1)

Characters

Characters
gives a list of the characters in a string.
  • Each character is given as a length one string.
  • Characters handles both ordinary and special characters.
Break a string into a list of characters:
Show in InputForm:
Reassemble the string:
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]=
Characters handles special characters just like ordinary ones:
Characters threads itself element-wise over lists:
Break a string into overlapping trigrams:
Reassemble into strings:
Sort the characters in a string:
Find their frequencies:
Rotate the characters in a string:
Make an array out of a list of strings:
Characters gives a list of strings of length 1:
A string form of an expression must be created before it can be broken into characters:
Characters operates on the explicit character form of strings:
Characters normally treats special characters just like other characters:
Use ToString and FullForm to get the characters in the full names of special characters:
New in 1 | Last modified in 3