String Operations

Mathematica incorporates the latest highly efficient algorithms to allow operations on strings with millions of elements, all making use of Mathematica's unique symbolic string patterns.

ReferenceReference

StringJoin join strings together

StringSplit split strings at whitespace, or any specified pattern

StringLength length of a string (in Unicode characters)

StringTake ▪ StringDrop ▪ StringInsert

StringTrim trim whitespace etc. from strings

StringPosition find positions of substrings or string patterns

StringReplacePart replace substrings at specified positions

StringReverse reverse the characters in a string

StringReplace make replacements for substrings or string patterns

StringCases give all cases of string patterns in a string

StringCount count occurrences of a string pattern

StringFreeQ ▪ StringMatchQ ▪ StringReplaceList

Characters break a string into a list of characters

Hash compute hash codes for a string

ImportString, ExportString translate between many string formats

StringToStream set up a string to be read sequentially

Read ▪ Find ▪ Skip ▪ SetStreamPosition ▪ ...

String Data Operations »

SequenceAlignment ▪ Nearest ▪ FindClusters ▪ DictionaryLookup ▪ ...

New to Mathematica? Find your learning path »
Have a question? Ask support »