This is documentation for Mathematica 6, which was
based on an earlier version of the Wolfram Language.
View current documentation (Version 11.2)
String Manipulation
Integrated into the core Mathematica language is industrial-strength string manipulation, not only with ordinary regular expressions, but also with Mathematica's own powerful general symbolic string-pattern language.
"string" a string, allowing Unicode or special characters
Structural Operations
StringJoin (<>) join strings together
StringLength length of a string
StringSplit split a string into words or other units
StringTake, StringDrop take or drop parts of a string
StringExpression a symbolic string expression including symbolic string patterns
Longest  ▪ Shortest  ▪ Except  ▪ Whitespace  ▪ NumberString  ▪ ...
StringReplace make replacements for string patterns
StringCases find cases of string patterns
StringFreeQ test whether a string is free of a string pattern
Sort sort strings alphabetically or otherwise
Riffle riffle lists of objects {a, x, a, x, a, x, a}
Nearest find strings nearest in edit distance
DictionaryLookup look up strings in an English dictionary
ToString, ToExpression convert between expressions and strings >>>
ImportString, ExportString translate many formats of strings
"XML"  ▪ "Table"  ▪ ...
Characters break a string into a list of characters
ToUpperCase  ▪ ToCharacterCode  ▪ LetterQ  ▪ ...